tweak connection points in deficit round-robin of outgoing connection attempts balancing between torrents
This commit is contained in:
@@ -3341,7 +3341,10 @@ namespace aux {
|
|||||||
torrent& t = *m_next_connect_torrent->second;
|
torrent& t = *m_next_connect_torrent->second;
|
||||||
if (t.want_more_peers())
|
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
|
// have a bias against torrents with more peers
|
||||||
// than average
|
// than average
|
||||||
if (!t.is_seed() && t.num_peers() > average_peers)
|
if (!t.is_seed() && t.num_peers() > average_peers)
|
||||||
|
Reference in New Issue
Block a user