From: Matt Joiner Date: Sun, 4 Feb 2018 02:00:08 +0000 (+1100) Subject: connections should not be added if the Torrent is closed X-Git-Tag: v1.0.0~208 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ec7b90db45ea633c2d1522f1923530bd06700524;p=btrtrc.git connections should not be added if the Torrent is closed --- 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() {