From 886364118caef386fb42788a0aa6f895e11b6ded Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 25 Feb 2012 10:57:36 +0000 Subject: [PATCH] tweak connection points in deficit round-robin of outgoing connection attempts balancing between torrents --- src/session_impl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 1147e12fa..86775142b 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -3341,7 +3341,10 @@ namespace aux { torrent& t = *m_next_connect_torrent->second; if (t.want_more_peers()) { - int connect_points = 100; + // 133 is so that the average of downloaders with + // more than average peers and less than average + // peers will end up being 100 (i.e. 133 / 2 = 66) + int connect_points = 133; // have a bias against torrents with more peers // than average if (!t.is_seed() && t.num_peers() > average_peers)