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.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/index.js b/index.js
index 8ed828a..70a2818 100644
--- a/index.js
+++ b/index.js
@@ -134,7 +134,7 @@ function WebTorrent (opts) {
debug('new webtorrent (peerId %s, nodeId %s)', self.peerId, self.nodeId)
- if (typeof loadIPSet === 'function') {
+ if (typeof loadIPSet === 'function' && opts.blocklist != null) {
loadIPSet(opts.blocklist, {
headers: {
'user-agent': 'WebTorrent/' + VERSION + ' (https://webtorrent.io)'
@@ -144,7 +144,9 @@ function WebTorrent (opts) {
self.blocked = ipSet
ready()
})
- } else process.nextTick(ready)
+ } else {
+ process.nextTick(ready)
+ }
function ready () {
if (self.destroyed) return