From: Matt Joiner Date: Sun, 21 Feb 2016 16:23:49 +0000 (+1100) Subject: Fix failure to request data from peers if it goes missing after being downloaded... X-Git-Tag: v1.0.0~858 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=c371502cb3e1da2d4c1c76a1446725e411e5c788;p=btrtrc.git 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. --- 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 {