Finish mainReadLoop on Torrent closed
This commit is contained in:
parent
44e44637bf
commit
2e36ad19d9
|
@ -898,7 +898,7 @@ func (c *connection) mainReadLoop() error {
|
|||
defer cl.mu.Lock()
|
||||
err = decoder.Decode(&msg)
|
||||
}()
|
||||
if cl.closed.IsSet() || c.closed.IsSet() || err == io.EOF {
|
||||
if t.closed.IsSet() || c.closed.IsSet() || err == io.EOF {
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue