From: Matt Joiner Date: Sun, 7 Feb 2016 10:56:59 +0000 (+1100) Subject: Fix overpublishing of piece state change during hashing X-Git-Tag: v1.0.0~906 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=096c870029533198d653ab4697aa34b720f8c5f2;p=btrtrc.git Fix overpublishing of piece state change during hashing --- diff --git a/client.go b/client.go index 16276705..5429dd87 100644 --- a/client.go +++ b/client.go @@ -2511,8 +2511,8 @@ func (cl *Client) verifyPiece(t *torrent, piece int) { cl.event.Wait() } p.QueuedForHash = false - t.publishPieceChange(piece) if t.isClosed() || t.pieceComplete(piece) { + t.publishPieceChange(piece) return } p.Hashing = true