From 377c00a826a0d80b137bf22d7d2d4be6dc51f31c Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 16 Jan 2008 20:24:18 +0000 Subject: [PATCH] a test: if we set the reconnect period to any given peer to > 900 seconds, will that make "router death" go away? 900 seconds is the usual router setting for timing out bad sockets. --- 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 72594400e..aec492c5d 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -1832,14 +1832,10 @@ getPeerCandidates( Torrent * t, int * setmeSize ) * hold off on this peer to give another one a try instead */ if( ( now - atom->piece_data_time ) > 30 ) { - int minWait = (60 * 5); /* five minutes */ - int maxWait = (60 * 30); /* thirty minutes */ - int wait = atom->numFails * minWait; - if( wait < minWait ) wait = minWait; - if( wait > maxWait ) wait = maxWait; - if( ( now - atom->time ) < wait ) { + const int interval = 960; + if( ( now - atom->time ) < interval ) { tordbg( t, "RECONNECT peer %d (%s) is in its grace period of %d seconds..", - i, tr_peerIoAddrStr(&atom->addr,atom->port), wait ); + i, tr_peerIoAddrStr(&atom->addr,atom->port), interval ); continue; } }