diff --git a/index.js b/index.js index 69cfc09..c98cf52 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ function Client (peerId, port, torrent, opts) { // required self._peerId = Buffer.isBuffer(peerId) ? peerId - : new Buffer(torrent.peerId, 'utf8') + : new Buffer(peerId, 'utf8') self._port = port self._infoHash = Buffer.isBuffer(torrent.infoHash) ? torrent.infoHash