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

Can't get torrent.on('wire', function(wire, addr) {}) to work #470

Closed
DiegoRBaquero opened this issue Oct 28, 2015 · 2 comments
Closed

Can't get torrent.on('wire', function(wire, addr) {}) to work #470

DiegoRBaquero opened this issue Oct 28, 2015 · 2 comments
Labels

Comments

@DiegoRBaquero
Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Oct 28, 2015

I have the following:

torrent.on('wire', function(wire, addr) {
                       $log.debug("WIRE");
                    });

For some reason it never gets called. I also tried using the one in the examples and still nothing.

What's weird is that I do receive: webtorrent:torrent got wire (192.168.x.x:y) +1ms

According to https://github.com/feross/webtorrent/blob/master/lib/torrent.js it should get called, as it doesn't stop in any point inside Torrent.prototype._onWire but I still don't receive the event.

Any help is appreciated. Thank you!

Update
Figured that when the peer is LAN the event isn't emitted, however external ones do. I still can't figure why.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Feb 12, 2016

@DiegoRBaquero Sorry for missing this before. No idea why this would be happening, especially since the code is clearly already inside _onWire. Very strange. Closing because this function has changed a lot since October 2015 so it'll be hard to reproduce exactly.

@feross feross closed this Feb 12, 2016
@feross feross added the question label Feb 12, 2016
@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 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.