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

Problem when seeder disconnect/reconnect #1245

Closed
Ciao121 opened this issue Dec 18, 2017 · 7 comments · Fixed by webtorrent/bittorrent-tracker#332
Closed

Problem when seeder disconnect/reconnect #1245

Ciao121 opened this issue Dec 18, 2017 · 7 comments · Fixed by webtorrent/bittorrent-tracker#332

Comments

@Ciao121
Copy link

@Ciao121 Ciao121 commented Dec 18, 2017

Hi,
Let's say I'm seeding 5 files; if I disconnect the seeder, e.g. disconnecting ethernet cable for few second and reconnecting it, the seeder only sends an annonunce for one of the seeded files. All others file are not announced (I do not receive those on the tracker). But in client.torrents I can see all seeded files.
Any idea why is this happening?
Thank you!

@Ciao121

This comment has been minimized.

Copy link
Author

@Ciao121 Ciao121 commented Dec 18, 2017

This is happening using ws to send announces. using udp it seems it works fine.

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Dec 19, 2017

It should send announces every 120 seconds by default iirc

@Ciao121

This comment has been minimized.

Copy link
Author

@Ciao121 Ciao121 commented Dec 19, 2017

@DiegoRBaquero ,
thanks for your answer. But the problem is not about the timing.
If the seeder is seeding 5 files it sends 5 updates in the interval (default 120 sec if you remember right). But if the communication is interrupted (e.g for 5 seconds disconnecting the lan cable) and reconnected, the client only sends updates for 1 of the 5 seeded files.
And, as I said, this happen only sending updates to a ws tracker. When sending to a udp tracker all 5 announces are send.

I saw this adding a console.log('update') after
WebSocketTracker.prototype._onAnnounceResponse in bittorrent-tracker/lib/client/websocket-tracker.js

You may now know that I'm not really a programmer (^_^) and not really inside the torrent protocol. So I'm sorry if I'm misunderstanding something...

@Ciao121

This comment has been minimized.

Copy link
Author

@Ciao121 Ciao121 commented Dec 20, 2017

I'm investigating why I do have this issue.
Looking at /bittorrent-tracker/lib/client/websocket-tracker.js
The code at

WebSocketTracker.prototype._startReconnectTimer = function () {
.....
}

Is executed as many times as the number of seeded files.
So, if I'm seeding 5 files, it is executed 5 times. It's like if a websocket connection to the tracker is needed for every seeded file (I don't think this is true)

When the seeder reconnects the first "expected socket"(???)
self.reconnecting is set to false
and all "missing expected sockets" are not reconnecting so, I presume, announces are not sent for files "associated" to those sockets.

Sorry for my english. It's not easy to clearly explain a such technical thing :)

@Ciao121

This comment has been minimized.

Copy link
Author

@Ciao121 Ciao121 commented Dec 20, 2017

I made a video (look ad 1080p) where the problem is very clear. I used a very short tracker update interval to make the video.
https://www.youtube.com/watch?v=ekFrREJAlQs

@stale stale bot added the stale label May 3, 2018
@webtorrent webtorrent deleted a comment from stale bot May 4, 2018
@stale stale bot removed the stale label May 4, 2018
@stale

This comment has been minimized.

Copy link

@stale stale bot commented Aug 2, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Aug 2, 2018
@stale stale bot closed this Aug 9, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Nov 7, 2018
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Aug 5, 2019

Thanks for reporting this and for the helpful video. Sorry for the long delay. This looks like a real bug. If it's still in the current version, we should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.