From 9ffb9b0b8890e97a7675b2f97fec3e71f970d283 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 26 Feb 2015 16:10:15 +1100 Subject: [PATCH] Scale readahead pieces a bit --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index c7507932..2fff46a9 100644 --- a/client.go +++ b/client.go @@ -274,7 +274,7 @@ func (cl *Client) readRaisePiecePriorities(t *torrent, off, _len int64) { return } cl.raisePiecePriority(t, index, piecePriorityNext) - for i := 0; i < 3; i++ { + for i := 0; i < t.numConnsUnchoked()/2; i++ { index++ if index >= t.numPieces() { break