mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-18 20:21:36 +00:00
bugfix: client send correct peerId to server
This commit is contained in:
parent
e87f800b94
commit
4daca0540c
2
index.js
2
index.js
@ -28,7 +28,7 @@ function Client (peerId, port, torrent, opts) {
|
||||
// required
|
||||
self._peerId = Buffer.isBuffer(peerId)
|
||||
? peerId
|
||||
: new Buffer(torrent.infoHash, 'utf8')
|
||||
: new Buffer(torrent.peerId, 'utf8')
|
||||
self._port = port
|
||||
self._infoHash = Buffer.isBuffer(torrent.infoHash)
|
||||
? torrent.infoHash
|
||||
|
Loading…
Reference in New Issue
Block a user