From b196fe776566766b09a3e588acb9ebc8532ecfaa Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 28 Nov 2021 22:37:56 +1100 Subject: [PATCH] Wanting peers is a subset of wanting conns --- torrent.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() { -- 2.44.0