From: Matt Joiner Date: Sun, 28 Nov 2021 11:37:56 +0000 (+1100) Subject: Wanting peers is a subset of wanting conns X-Git-Tag: v1.39.0~40 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=b196fe776566766b09a3e588acb9ebc8532ecfaa;p=btrtrc.git Wanting peers is a subset of wanting conns --- diff --git a/torrent.go b/torrent.go index 244d3281..45540b68 100644 --- a/torrent.go +++ b/torrent.go @@ -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() {