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:
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 1476004..00920e0 100644
--- a/index.js
+++ b/index.js
@@ -286,6 +286,7 @@ class WebTorrent extends EventEmitter {
for (const t of this.torrents) {
if (t.infoHash === torrent.infoHash && t !== torrent) {
torrent._destroy(new Error(`Cannot add duplicate torrent ${torrent.infoHash}`))
+ ontorrent(t)
return
}
}