Ignore cached piece completion state when verifying data

Forcing data to be checked via VerifyData, and probably other places where piece checks are queued were being short-circuited due to cached piece completion. If a piece check is queued, or verifyData called, the cached completion state should be ignored.
This commit is contained in:
Matt Joiner 2019-07-25 14:10:21 +10:00
parent 018de2c96c
commit bbeb69bb5f
1 changed files with 1 additions and 1 deletions

View File

@ -1619,7 +1619,7 @@ func (t *Torrent) verifyPiece(piece pieceIndex) {
panic("piece was not queued")
}
t.updatePiecePriority(piece)
if t.closed.IsSet() || t.pieceComplete(piece) {
if t.closed.IsSet() {
return
}
p.hashing = true