Pieces being marked should have priority none

Also reorder the checks a bit to favour the cheaper ones.
This commit is contained in:
Matt Joiner 2021-10-09 14:20:54 +11:00
parent 637045c19a
commit 329578520a
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ func (p *Piece) purePriority() (ret piecePriority) {
} }
func (p *Piece) uncachedPriority() (ret piecePriority) { func (p *Piece) uncachedPriority() (ret piecePriority) {
if p.t.pieceComplete(p.index) || p.t.pieceQueuedForHash(p.index) || p.t.hashingPiece(p.index) { if p.hashing || p.marking || p.t.pieceComplete(p.index) || p.queuedForHash() {
return PiecePriorityNone return PiecePriorityNone
} }
return p.purePriority() return p.purePriority()