1
0
mirror of https://github.com/veggiedefender/torrent-client.git synced 2025-11-06 09:29:16 +02:00

Correct the size of a piece

Previously confused piece vs block
This commit is contained in:
Jesse
2019-12-30 10:23:12 -05:00
parent 928bbfeab4
commit 402e4e1665

View File

@@ -108,7 +108,7 @@ func attemptDownloadPiece(c *client, pw *pieceWork) ([]byte, error) {
}
// Setting a deadline helps get unresponsive peers unstuck.
// 30 seconds is more than enough time to download 16 KB
// 30 seconds is more than enough time to download a 262 KB piece
c.conn.SetDeadline(time.Now().Add(30 * time.Second))
defer c.conn.SetDeadline(time.Time{}) // Disable the deadline