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

Cole websocket connection under a condition #1239

Closed
Ciao121 opened this issue Dec 10, 2017 · 3 comments
Closed

Cole websocket connection under a condition #1239

Ciao121 opened this issue Dec 10, 2017 · 3 comments

Comments

@Ciao121
Copy link

@Ciao121 Ciao121 commented Dec 10, 2017

Hi,
when a seeder changes ip (e.g. switching from a vpn to another one) the websocket connection to the tracker is still available. I'd like to disconnect the seeder from the tracker when this happens. So my idea was to kill the websocket connection (on the seeder client I'm making). But I can't find how to do it.

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Dec 10, 2017

You would need to detect IP changes on the seeder and make it disconnect. There must be packages to detect IP, you'd need to set an interval in which it's checked.

@Ciao121

This comment has been minimized.

Copy link
Author

@Ciao121 Ciao121 commented Dec 10, 2017

Thanks @DiegoRBaquero
I'm already detecting the IP change. What I'n not understanding is how, in the client, to close the WS connection (and to reopen a new one later) to the tracker. Right now I'm using client.destroy() but this also destroy client.torrent, calculated hashes etc etc.

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Dec 11, 2017

Destroy the bittorent-tracker client, not the webtorrent client. See: https://github.com/webtorrent/bittorrent-tracker#client

@lock lock bot locked as resolved and limited conversation to collaborators May 25, 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
2 participants
You can’t perform that action at this time.