connections should not be added if the Torrent is closed

This commit is contained in:
Matt Joiner 2018-02-04 13:00:08 +11:00
parent ea8659c951
commit ec7b90db45
1 changed files with 1 additions and 1 deletions

View 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() {