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:
authorDiego Rodríguez Baquero <github@diegorbaquero.com>2021-09-02 14:33:42 +0300
committerGitHub <noreply@github.com>2021-09-02 14:33:42 +0300
commit320541f271fdbd7303f544b6e99ab6b0a450fd8c (patch)
tree760ee0d4a57e8bb8913b831dc6bf87409984c6ab /index.js
parent7b245b5abc2e4f6063af3f3fe484dd3089879942 (diff)
fix: DHT cleanup after torrent removal (#2185)
Supersedes #1289
Diffstat (limited to 'index.js')
-rw-r--r--index.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/index.js b/index.js
index ec516a0..9f3f242 100644
--- a/index.js
+++ b/index.js
@@ -424,6 +424,9 @@ class WebTorrent extends EventEmitter {
if (!torrent) return
this.torrents.splice(this.torrents.indexOf(torrent), 1)
torrent.destroy(opts, cb)
+ if (this.dht) {
+ this.dht._tables.remove(torrent.infoHash)
+ }
}
address () {