From 0d819bd67e5f8b3f9e7c180f9ddaf2395605ce6c Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 8 Nov 2007 19:43:48 +0000 Subject: [PATCH] more work on the "router death" issue. --- libtransmission/peer-mgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index e49c369b7..8aa55b97e 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -71,7 +71,7 @@ enum /* set this too high and there will be a lot of churn. * set it too low and you'll get peers too slowly */ - MAX_RECONNECTIONS_PER_PULSE = 10, + MAX_RECONNECTIONS_PER_PULSE = 5, /* corresponds to ut_pex's added.f flags */ ADDED_F_ENCRYPTION_FLAG = 1, @@ -1711,7 +1711,8 @@ reconnectPulse( void * vtorrent ) } /* add some new ones */ - nAdd = MAX_CONNECTED_PEERS_PER_TORRENT - peerCount; + nAdd = !peerCount ? MAX_CONNECTED_PEERS_PER_TORRENT + : MAX_RECONNECTIONS_PER_PULSE; for( i=0; imanager;