mirror of
https://github.com/transmission/transmission
synced 2025-03-04 10:38:13 +00:00
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
1 changed files with 3 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue