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:
authorFeross Aboukhadijeh <feross@feross.org>2016-02-10 04:01:42 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-02-10 09:43:28 +0300
commitffe6892906331c8e7f1568d4175430fa1680387f (patch)
treedbd88cc797a82032f6600cbe98b51a8048fb8c86 /index.js
parent7801a634d2181e6874f75c880dc3d36f6f30ec89 (diff)
fix opts { dht: false } option
Diffstat (limited to 'index.js')
-rw-r--r--index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.js b/index.js
index 7b12d56..3b8694a 100644
--- a/index.js
+++ b/index.js
@@ -83,6 +83,8 @@ function WebTorrent (opts) {
// use a single DHT instance for all torrents, so the routing table can be reused
self.dht = new DHT(extend({ nodeId: self.nodeId }, opts.dht))
self.dht.listen(opts.dhtPort)
+ } else {
+ self.dht = false
}
debug('new webtorrent (peerId %s, nodeId %s)', self.peerId, self.nodeId)