From c371502cb3e1da2d4c1c76a1446725e411e5c788 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 22 Feb 2016 03:23:49 +1100 Subject: [PATCH] Fix failure to request data from peers if it goes missing after being downloaded during the same session The chunks remained marked dirty, even after the piece was marked complete. So when the piece was not complete, there was nothing to do. --- client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client.go b/client.go index 91ea730e..cff3e562 100644 --- a/client.go +++ b/client.go @@ -2435,6 +2435,7 @@ func (me *Client) pieceHashed(t *torrent, piece int, correct bool) { func (me *Client) onCompletedPiece(t *torrent, piece int) { t.pendingPieces.Remove(piece) + t.pendAllChunkSpecs(piece) for _, conn := range t.Conns { conn.Have(piece) for r := range conn.Requests { -- 2.48.1