Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.js b/index.js
index 8cf9073..76279ae 100644
--- a/index.js
+++ b/index.js
@@ -51,7 +51,7 @@ function WebTorrent (opts) {
self.peerId = opts.peerId === undefined
? new Buffer('-WW0001-' + hat(48), 'utf8')
: typeof opts.peerId === 'string'
- ? new Buffer(opts.peerId, 'utf8')
+ ? new Buffer(opts.peerId, 'hex')
: opts.peerId
self.peerIdHex = self.peerId.toString('hex')