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

Seeding a torrent that uses both ws and udp on the same tracker crashes the tracker #78

Closed
gmbuell opened this issue Jun 3, 2015 · 3 comments

Comments

@gmbuell
Copy link
Contributor

gmbuell commented Jun 3, 2015

I can't reproduce this using tracker.webtorrent.io since I can't seem to connect using udp. However, when running a local tracker with this client code:

var torrent = client.seed(filePath, {
    announceList: [['udp://mytracker:8000',
                    'ws://mytracker:8000']]
});

Crashes the tracker with

/usr/local/lib/node_modules/bittorrent-tracker/server.js:314
        peer.socket.send(JSON.stringify({
                   ^
TypeError: Cannot read property 'send' of undefined
    at /usr/local/lib/node_modules/bittorrent-tracker/server.js:314:20
    at Array.forEach (native)
    at /usr/local/lib/node_modules/bittorrent-tracker/server.js:313:13
    at /usr/local/lib/node_modules/bittorrent-tracker/server.js:398:5
    at Swarm.announce (/usr/local/lib/node_modules/bittorrent-tracker/lib/swarm.js:23:5)
    at Server._onAnnounce (/usr/local/lib/node_modules/bittorrent-tracker/server.js:366:9)
    at Server._onRequest (/usr/local/lib/node_modules/bittorrent-tracker/server.js:353:10)
    at Server._onWebSocketRequest (/usr/local/lib/node_modules/bittorrent-tracker/server.js:289:8)
    at WebSocket.emit (events.js:110:17)
    at Receiver.ontext (/usr/local/lib/node_modules/bittorrent-tracker/node_modules/ws/lib/WebSocket.js:797:10)
@feross
Copy link
Member

feross commented Jun 6, 2015

Thanks for the report. I think I know what's causing this.

@feross
Copy link
Member

feross commented Jun 6, 2015

Okay, this is fixed in the latest bittorrent-tracker, v4.4.4.

And the UDP server is running on tracker.webtorrent.io again :)

@feross feross closed this as completed Jun 6, 2015
@feross
Copy link
Member

feross commented Jun 6, 2015

96f6fce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants