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

Sending updates to the tracker #1236

Closed
Ciao121 opened this issue Dec 5, 2017 · 7 comments
Closed

Sending updates to the tracker #1236

Ciao121 opened this issue Dec 5, 2017 · 7 comments

Comments

@Ciao121
Copy link

@Ciao121 Ciao121 commented Dec 5, 2017

What version of WebTorrent?
0.98.20
What operating system and Node.js version?
Win10/8.5.0
What browser and version? (if using WebTorrent in the browser)
Electron

I'm building an electron app. I just noticed that my app does not send updates to the tracker at all (I'm using bittorrent-tracker, ws protocol and --interval option) as I see webtorrent-desktop does, and I cannot find out why.

I tried to find where this happen in webtorrent-desktop but I couldn't find it (maybe because "update" is a very generic term and I'm loosing myself in the code).

Can somebody give an help to find the problem?
Thank you!!

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Dec 5, 2017

What do you mean "send updates to tracker"?

@Ciao121

This comment has been minimized.

Copy link
Author

@Ciao121 Ciao121 commented Dec 5, 2017

When I seed a local file using webtorrent-desktop I can see on the tracker console those events:

start: 2d5757303039382d425745706f536b5465486c58 (when I start seeding)
update: 2d5757303039382d425745706f536b5465486c58 (repeating exery x secondos/minutes)
update: 2d5757303039382d425745706f536b5465486c58
update: 2d5757303039382d425745706f536b5465486c58
stop: 2d5757303039382d493450363365576d33586e48(when I stop seeding)

With my client the updates events are missing and I only get:

start: 2d5757303039382d493450363365576d33586e47 (when I start seeding)
stop: 2d5757303039382d493450363365576d33586e47 (when I stop seeding)
@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Dec 5, 2017

Are you using node version in electron, or browser version?

@Ciao121

This comment has been minimized.

Copy link
Author

@Ciao121 Ciao121 commented Dec 5, 2017

In electron, as webtorrent-desktop

@Ciao121

This comment has been minimized.

Copy link
Author

@Ciao121 Ciao121 commented Dec 5, 2017

mmmm I think I have found the problem...
I copied in my app the bittorrent-tracker module folder form webtorrent-desktop and it sends updates now.
I'm now looking if was something I changed in my bittorrent-tracker module folder.. I really do not remember... I'll update :)

@Ciao121

This comment has been minimized.

Copy link
Author

@Ciao121 Ciao121 commented Dec 5, 2017

Ok, sorted out.
in my app's /node_modules/bittorrent-tracker/lib/client/tracker.js
lines

  if (intervalMs) {
    self.interval = setInterval(function () {
      self.announce(self.client._defaultAnnounceOpts())
    }, intervalMs)
    if (self.interval.unref) self.interval.unref()
  }

were commente out :/
Really can't remember if/when/why I did it.

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Dec 5, 2017

ALright :)

@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.