From ec7b90db45ea633c2d1522f1923530bd06700524 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 4 Feb 2018 13:00:08 +1100 Subject: [PATCH] connections should not be added if the Torrent is closed --- torrent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torrent.go b/torrent.go index 77371b13..12bc48f5 100644 --- a/torrent.go +++ b/torrent.go @@ -1436,7 +1436,7 @@ func (t *Torrent) reconcileHandshakeStats(c *connection) { // Returns true if the connection is added. func (t *Torrent) addConnection(c *connection, outgoing bool) bool { - if t.cl.closed.IsSet() { + if t.closed.IsSet() { return false } if !t.wantConns() { -- 2.50.0