Peers with all pieces have wanted pieces only if we want any piece
This commit is contained in:
parent
91e8f3e127
commit
51f6f07633
|
@ -1525,7 +1525,7 @@ func (cn *Peer) netGoodPiecesDirtied() int64 {
|
||||||
|
|
||||||
func (c *Peer) peerHasWantedPieces() bool {
|
func (c *Peer) peerHasWantedPieces() bool {
|
||||||
if all, _ := c.peerHasAllPieces(); all {
|
if all, _ := c.peerHasAllPieces(); all {
|
||||||
return !c.t.haveAllPieces()
|
return !c.t.haveAllPieces() && !c.t._pendingPieces.IsEmpty()
|
||||||
}
|
}
|
||||||
if !c.t.haveInfo() {
|
if !c.t.haveInfo() {
|
||||||
return !c.peerPieces().IsEmpty()
|
return !c.peerPieces().IsEmpty()
|
||||||
|
|
Loading…
Reference in New Issue