]> Sergey Matveev's repositories - btrtrc.git/commitdiff
connections should not be added if the Torrent is closed
authorMatt Joiner <anacrolix@gmail.com>
Sun, 4 Feb 2018 02:00:08 +0000 (13:00 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sun, 4 Feb 2018 02:00:08 +0000 (13:00 +1100)
torrent.go

index 77371b130826b407cc6807e40d236114fc6e9877..12bc48f559d6d4890bda12f6244c77587b2c8eb2 100644 (file)
@@ -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() {