From: Matt Joiner Date: Sat, 28 May 2016 12:04:33 +0000 (+1000) Subject: Reduce the impact of preferring earlier pieces X-Git-Tag: v1.0.0~691 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6cac8820306e713c4f901c023cfd9c4ea9ab7c6d;p=btrtrc.git Reduce the impact of preferring earlier pieces I think urgent pieces at the end of a torrent were getting fairly starved. --- 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() }