Wanting peers is a subset of wanting conns
This commit is contained in:
parent
f621f0f5a8
commit
b196fe7765
|
@ -1405,6 +1405,7 @@ func (t *Torrent) dropConnection(c *PeerConn) {
|
|||
}
|
||||
}
|
||||
|
||||
// Peers as in contact information for dialing out.
|
||||
func (t *Torrent) wantPeers() bool {
|
||||
if t.closed.IsSet() {
|
||||
return false
|
||||
|
@ -1412,7 +1413,7 @@ func (t *Torrent) wantPeers() bool {
|
|||
if t.peers.Len() > t.cl.config.TorrentPeersLowWater {
|
||||
return false
|
||||
}
|
||||
return t.needData() || t.seeding()
|
||||
return t.wantConns()
|
||||
}
|
||||
|
||||
func (t *Torrent) updateWantPeersEvent() {
|
||||
|
|
Loading…
Reference in New Issue