From d096b39f4b0e700395134fbf14e150b23282b501 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 26 Nov 2009 18:38:37 +0000 Subject: [PATCH] (trunk libT) #2430 "peer atom pool grows too large" -- tweak the default atom shelf lives based on discussion in the ticket's comments section --- libtransmission/peer-mgr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 299cad091..23a279f6e 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -1397,13 +1397,13 @@ getDefaultShelfLife( uint8_t from ) * are better than those from secondhand, etc etc */ switch( from ) { - case TR_PEER_FROM_INCOMING : return 60 * 60 * 8; - case TR_PEER_FROM_LTEP : return 60 * 60 * 8; - case TR_PEER_FROM_TRACKER : return 60 * 60 * 4; + case TR_PEER_FROM_INCOMING : return 60 * 60 * 6; + case TR_PEER_FROM_LTEP : return 60 * 60 * 6; + case TR_PEER_FROM_TRACKER : return 60 * 60 * 3; + case TR_PEER_FROM_DHT : return 60 * 60 * 3; case TR_PEER_FROM_PEX : return 60 * 60 * 2; case TR_PEER_FROM_RESUME : return 60 * 60; - case TR_PEER_FROM_DHT : return 60 * 40; - default : return 60 * 60; + default : return 60 * 60; } } @@ -1422,7 +1422,7 @@ ensureAtomExists( Torrent * t, if( getExistingAtom( t, addr ) == NULL ) { struct peer_atom * a; - const int jitter = tr_cryptoWeakRandInt( 120 ); + const int jitter = tr_cryptoWeakRandInt( 60*10 ); a = tr_new0( struct peer_atom, 1 ); a->addr = *addr;