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.
This commit is contained in:
parent
fd37f5c24b
commit
c371502cb3
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue