From 6f6adb1d534e9d1c93106a550d749320877f86e1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 11 Jan 2008 00:38:26 +0000 Subject: [PATCH] try to ramp up fast connections more quickly. --- libtransmission/peer-mgr.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 4788184dd..16679e37c 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -74,7 +74,7 @@ enum RECHOKE_PERIOD_MSEC = (10 * 1000), /* how frequently to decide which peers live and die */ - RECONNECT_PERIOD_MSEC = (2 * 1000), + RECONNECT_PERIOD_MSEC = (5 * 1000), /* how frequently to refill peers' request lists */ REFILL_PERIOD_MSEC = 666, @@ -91,7 +91,7 @@ enum /* if this * RECONNECT_PERIOD_MSEC is too high, routers die. * if this * RECONNECT_PERIOD_MSEC it too low, peers come slow. */ - MAX_RECONNECTIONS_PER_PULSE = 1, + MAX_RECONNECTIONS_PER_PULSE = 16, /* corresponds to ut_pex's added.f flags */ ADDED_F_ENCRYPTION_FLAG = 1, @@ -1820,7 +1820,7 @@ reconnectPulse( void * vtorrent ) } else { - int i, nCandidates, nBad, addMax; + int i, nCandidates, nBad; struct peer_atom ** candidates = getPeerCandidates( t, &nCandidates ); struct tr_peer ** connections = getPeersToClose( t, &nBad ); @@ -1846,10 +1846,6 @@ reconnectPulse( void * vtorrent ) } /* add some new ones */ - addMax = tr_ptrArraySize(t->pool) - ? MAX_RECONNECTIONS_PER_PULSE - : t->tor->maxConnectedPeers; - for( i=0; imanager;