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>2014-11-03 08:27:28 +0300
committerFeross Aboukhadijeh <feross@feross.org>2014-11-03 08:27:28 +0300
commit5affbe3aabd246180b734482cf8c562a02a469a7 (patch)
tree804afdea15ed128a24b5505432a279058d24c9d7 /index.js
parentbdfa01c5951f1c6befa4e5d92a261c8ae2f5965d (diff)
suppress event emitter warning in production
Diffstat (limited to 'index.js')
-rw-r--r--index.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/index.js b/index.js
index 7bb6374..f6fcb41 100644
--- a/index.js
+++ b/index.js
@@ -31,6 +31,7 @@ function WebTorrent (opts) {
if (!(self instanceof WebTorrent)) return new WebTorrent(opts)
if (!opts) opts = {}
EventEmitter.call(self)
+ if (!debug.enabled) self.setMaxListeners(0)
self.torrentPort = opts.torrentPort || 0
self.tracker = (opts.tracker !== undefined) ? opts.tracker : true