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.
This commit is contained in:
parent
4b5e05f12e
commit
377c00a826
|
@ -1832,14 +1832,10 @@ getPeerCandidates( Torrent * t, int * setmeSize )
|
||||||
* hold off on this peer to give another one a try instead */
|
* hold off on this peer to give another one a try instead */
|
||||||
if( ( now - atom->piece_data_time ) > 30 )
|
if( ( now - atom->piece_data_time ) > 30 )
|
||||||
{
|
{
|
||||||
int minWait = (60 * 5); /* five minutes */
|
const int interval = 960;
|
||||||
int maxWait = (60 * 30); /* thirty minutes */
|
if( ( now - atom->time ) < interval ) {
|
||||||
int wait = atom->numFails * minWait;
|
|
||||||
if( wait < minWait ) wait = minWait;
|
|
||||||
if( wait > maxWait ) wait = maxWait;
|
|
||||||
if( ( now - atom->time ) < wait ) {
|
|
||||||
tordbg( t, "RECONNECT peer %d (%s) is in its grace period of %d seconds..",
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue