From 51f6f07633b3e78cd500dae71de4179179c5614c Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 28 Nov 2021 22:36:19 +1100 Subject: [PATCH] Peers with all pieces have wanted pieces only if we want any piece --- peerconn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peerconn.go b/peerconn.go index 06469461..003e32c5 100644 --- a/peerconn.go +++ b/peerconn.go @@ -1525,7 +1525,7 @@ func (cn *Peer) netGoodPiecesDirtied() int64 { func (c *Peer) peerHasWantedPieces() bool { if all, _ := c.peerHasAllPieces(); all { - return !c.t.haveAllPieces() + return !c.t.haveAllPieces() && !c.t._pendingPieces.IsEmpty() } if !c.t.haveInfo() { return !c.peerPieces().IsEmpty() -- 2.48.1