Skip to content

Conversation

@DiegoRBaquero
Copy link
Member

Minimum set at 15 seconds, each retry adds 30 seconds.

Fixes webtorrent#659

Minimum set at 15 seconds, each retry adds 30 seconds.
@alxhotel
Copy link
Member

I think there should be a maximum, like 5 or 10 minutes

@DiegoRBaquero
Copy link
Member Author

@alxhotel Agreed. Max of 5 minutes seems reasonable.

@feross
Copy link
Member

feross commented Mar 16, 2016

The variance is important for when a tracker suddenly goes down and thousands of clients are trying to reconnect at the same time. If they all send requests in at the same time, it can be harder for the tracker to recover. I'd prefer to keep the variance in there.

Other improvements:

  • The max should be raised to at least 20 minutes because if a tracker is down, checking every 5 minutes is much too frequently.
  • The reconnect timeout should double each time, not merely increase linearly. So dead trackers reach the max time more quickly.

@feross
Copy link
Member

feross commented Mar 16, 2016

FWIW, the default announce interval for an http/udp tracker is 30 minutes. So that might be a good vaue to set the maximum to.

@feross
Copy link
Member

feross commented Mar 16, 2016

LGTM!

feross added a commit that referenced this pull request Mar 16, 2016
Reconnect timeout improvement
@feross feross merged commit 5d4cf75 into webtorrent:master Mar 16, 2016
@feross
Copy link
Member

feross commented Mar 16, 2016

7.5.2.

@DiegoRBaquero DiegoRBaquero deleted the patch-1 branch March 16, 2016 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants