client.go | 4 ++++ diff --git a/client.go b/client.go index ff8dbf4bf65abc82cc5727831ed20efff3f744a2..cd65f55de54994213f2b8c759148b0129b673c2b 100644 --- a/client.go +++ b/client.go @@ -1735,6 +1735,10 @@ func (cl *Client) connectionPruner(t *torrent) { for { time.Sleep(15 * time.Second) cl.mu.Lock() + select { + case <-t.ceasingNetworking: + default: + } license := len(t.Conns) - (socketsPerTorrent+1)/2 for _, c := range t.Conns { if license <= 0 {