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>2015-01-26 22:30:22 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-01-26 22:30:22 +0300
commit7b6cfebd732dae5b630e12a107c0a4036b7100eb (patch)
tree66f567eaf2ac96cf006340b12fc700284e0b9d5e /index.js
parente2ca6fbaba8f59d31de315d4d5515f7f527bace0 (diff)
after client.destroy(), no "ready" event emitted
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 27f7f48..9c8fa32 100644
--- a/index.js
+++ b/index.js
@@ -91,6 +91,7 @@ function WebTorrent (opts) {
} else process.nextTick(ready)
function ready () {
+ if (self.destroyed) return
self.ready = true
self.emit('ready')
}