bugfix: client send correct peerId to server

This commit is contained in:
Feross Aboukhadijeh 2014-04-11 21:55:06 -07:00
parent e87f800b94
commit 4daca0540c

View File

@ -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