From: Matt Joiner Date: Sat, 19 Jul 2025 11:45:34 +0000 (+1000) Subject: Fix piece hashing expvars update condition X-Git-Tag: v1.59.0~6 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=51a71b1fd4eba7abaa0c210112bcfe29475e1b54;p=btrtrc.git Fix piece hashing expvars update condition --- diff --git a/torrent.go b/torrent.go index 1a0db793..bbbbf634 100644 --- a/torrent.go +++ b/torrent.go @@ -2498,7 +2498,7 @@ func (t *Torrent) pieceHashed(piece pieceIndex, passed bool, hashIoErr error) { } // Don't score the first time a piece is hashed, it could be an initial check. - if p.numVerifies == 1 { + if t.initialPieceCheckDisabled || p.numVerifies != 1 { if passed { pieceHashedCorrect.Add(1) } else {