Torrent.unpendPieces: Only update unpended pieces
Updating all pieces at once is no longer faster. (There was an optimization for this a while ago that no longer exists.)
This commit is contained in:
parent
a8e96ce996
commit
df60a765a7
|
@ -982,7 +982,10 @@ func (t *Torrent) getCompletedPieces() (ret bitmap.Bitmap) {
|
|||
|
||||
func (t *Torrent) unpendPieces(unpend *bitmap.Bitmap) {
|
||||
t.pendingPieces.Sub(unpend)
|
||||
t.updatePiecePriorities()
|
||||
unpend.IterTyped(func(piece int) (again bool) {
|
||||
t.updatePiecePriority(piece)
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
func (t *Torrent) pendPieceRange(begin, end int) {
|
||||
|
|
Loading…
Reference in New Issue