Filter update requests on piece priority change by peer choking and allowed fast

This commit is contained in:
Matt Joiner 2021-11-30 15:19:59 +11:00
parent a9485e8796
commit ba592028e5
1 changed files with 3 additions and 0 deletions

View File

@ -1091,6 +1091,9 @@ func (t *Torrent) piecePriorityChanged(piece pieceIndex, reason string) {
if !c.peerHasPiece(piece) {
return
}
if c.peerChoking && !c.peerAllowedFast.Contains(uint32(piece)) {
return
}
c.updateRequests(reason)
})
}