From bbeb69bb5fd8393af085c2df662d080559fd9b80 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 25 Jul 2019 14:10:21 +1000 Subject: [PATCH] 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. --- torrent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torrent.go b/torrent.go index 15029945..26f23869 100644 --- a/torrent.go +++ b/torrent.go @@ -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