You've already forked torrent-client
mirror of
https://github.com/veggiedefender/torrent-client.git
synced 2025-11-06 17:39:54 +02:00
Check error in request to client
This commit is contained in:
@@ -116,7 +116,10 @@ func attemptDownloadPiece(c *client, pw *pieceWork) ([]byte, error) {
|
|||||||
blockSize = pw.length - state.requested
|
blockSize = pw.length - state.requested
|
||||||
}
|
}
|
||||||
|
|
||||||
c.request(pw.index, state.requested, blockSize)
|
err := c.request(pw.index, state.requested, blockSize)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
state.backlog++
|
state.backlog++
|
||||||
state.requested += blockSize
|
state.requested += blockSize
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user