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

torrent.on('wire', function (wire) {}) not being called on LAN peers #938

Closed
John-p0pe opened this issue Oct 4, 2016 · 6 comments
Closed

torrent.on('wire', function (wire) {}) not being called on LAN peers #938

John-p0pe opened this issue Oct 4, 2016 · 6 comments

Comments

@John-p0pe
Copy link

@John-p0pe John-p0pe commented Oct 4, 2016

torrent.on('wire', function (wire) {})

The wire event isn't being called when the Peer is on a LAN. It works fine with external peers.

It seems that after an external peer is connected first , the lan peer connects and calls the wire event.
If the Lan peer connects first it doesnt call the wire event.

@John-p0pe John-p0pe changed the title torrent.on('wire', function (wire) {}) not firing on LAN peers torrent.on('wire', function (wire) {}) not being called on LAN peers Oct 4, 2016
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Oct 5, 2016

When you say LAN peer, do you mean another peer on the same computer? Or just on the same network?

@John-p0pe

This comment has been minimized.

Copy link
Author

@John-p0pe John-p0pe commented Oct 5, 2016

The same network

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Oct 6, 2016

Can you provide the minimal code it takes to reproduce this issue?

@John-p0pe

This comment has been minimized.

Copy link
Author

@John-p0pe John-p0pe commented Oct 7, 2016

client.add(torrentId, function (torrent) {

 torrent.on('wire', function(wire, addr) {
                        console.log("WIRE event from:  " + wire.remoteAddress);
                        console.log("PeerId : " + wire.peerId.toString());                        
}
}

I'm using the browser version of webtorrent if that matters.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Oct 30, 2016

I'm using the browser version of webtorrent if that matters.

Yes, that matters! WebRTC connectivity depends heavily on the network that you're on. The only thing I can recommend is for you to try specifying the rtcConfig option to the WebTorrent constructor.

More info:

@feross feross closed this Oct 30, 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.