From 6cac8820306e713c4f901c023cfd9c4ea9ab7c6d Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 28 May 2016 22:04:33 +1000 Subject: [PATCH] Reduce the impact of preferring earlier pieces I think urgent pieces at the end of a torrent were getting fairly starved. --- connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connection.go b/connection.go index cbcd1c1e..366adbe4 100644 --- a/connection.go +++ b/connection.go @@ -534,7 +534,7 @@ func (cn *connection) updatePiecePriority(piece int) { default: panic(tpp) } - prio += piece + prio += piece / 2 cn.pieceRequestOrder.Set(piece, prio) cn.updateRequests() } -- 2.48.1