mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-02-07 13:59:07 +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
|
// required
|
||||||
self._peerId = Buffer.isBuffer(peerId)
|
self._peerId = Buffer.isBuffer(peerId)
|
||||||
? peerId
|
? peerId
|
||||||
: new Buffer(torrent.infoHash, 'utf8')
|
: new Buffer(torrent.peerId, 'utf8')
|
||||||
self._port = port
|
self._port = port
|
||||||
self._infoHash = Buffer.isBuffer(torrent.infoHash)
|
self._infoHash = Buffer.isBuffer(torrent.infoHash)
|
||||||
? torrent.infoHash
|
? torrent.infoHash
|
||||||
|
Loading…
Reference in New Issue
Block a user