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-04-01 11:26:42 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-04-01 11:26:42 +0300
commite7274b4134468de8505ce90d5210f5c65ad4a07c (patch)
tree067b23611e92d5310a82cdf09ced6bed280f4e0d /index.js
parent715dafe597efb0ae9b332a6681f8934ba380cbcd (diff)
Ignore warning when there are > 10 torrents in the client
Diffstat (limited to 'index.js')
-rw-r--r--index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/index.js b/index.js
index f6f7614..2e7fd9e 100644
--- a/index.js
+++ b/index.js
@@ -87,6 +87,10 @@ function WebTorrent (opts) {
self.emit('error', err)
self.destroy()
})
+
+ // Ignore warning when there are > 10 torrents in the client
+ self.dht.setMaxListeners(0)
+
self.dht.listen(opts.dhtPort)
} else {
self.dht = false