]> Sergey Matveev's repositories - btrtrc.git/blobdiff - peerconn.go
Peers with all pieces have wanted pieces only if we want any piece
[btrtrc.git] / peerconn.go
index 0646946174a5c1603352d7d500b850782a852401..003e32c57821fd135613ca370219170bb3828405 100644 (file)
@@ -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()