From 589ab02dc4c602de7137c43204f5c8b44bd58eec Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 17 Feb 2016 17:20:21 +1100 Subject: [PATCH] Ensure piece completion state is correct at startup --- torrent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torrent.go b/torrent.go index 589bff88..6e726a6e 100644 --- a/torrent.go +++ b/torrent.go @@ -276,8 +276,8 @@ func (t *torrent) setStorage(td Data) { t.data.Close() } t.data = td - t.completedPieces.Clear() for i := range t.Pieces { + t.updatePieceCompletion(i) t.Pieces[i].QueuedForHash = true } go func() { -- 2.48.1