Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better offline reconnect behavior #318

Closed
feross opened this issue May 16, 2015 · 3 comments
Closed

better offline reconnect behavior #318

feross opened this issue May 16, 2015 · 3 comments

Comments

@feross
Copy link
Member

@feross feross commented May 16, 2015

When internet connectivity is lost, webtorrent (websocket) tracker connections are lost and no reconnect happens. We should detect this condition and improve how it's handled.

This module might help: https://github.com/feross/connectivity

@feross

This comment has been minimized.

Copy link
Member Author

@feross feross commented May 20, 2015

Reconnect behavior could still be improved. I don't see https://instant.io reconnecting to the websocket tracker after my laptop battery has died, or I've shut the lid.

@feross feross reopened this May 20, 2015
@feross

This comment has been minimized.

Copy link
Member Author

@feross feross commented May 20, 2015

The socket's readyState is 1, which is WebSocket.OPEN. Maybe we need to send heartbeats or something? Why isn't the 'close' event firing?

screen shot 2015-05-19 at 5 11 48 pm

@feross feross added the help wanted label May 20, 2015
@feross

This comment has been minimized.

Copy link
Member Author

@feross feross commented Jul 29, 2015

This is fixed now. You can go offline, come back online, and the download should resume. Also, remote peers who may be waiting for peers (because they have 0), will be able to connect to you.

There were many bugs that I squashed to close this issue:

simple-websocket

bittorrent-tracker

This fix is live on https://instant.io, and in webtorrent if you run npm update.

@feross feross closed this Jul 29, 2015
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.