Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cleanup DHT tables cache on torrent removal #1289

Open
wants to merge 5 commits into
base: master
from
Open
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

fix: cleanup DHT tables cache on torrent removal

Fix bug on second adding of same torrent
  • Loading branch information
DEgITx committed Feb 9, 2018
commit 4222a53369e420ab98e7c61adab3de56d0cefff6
@@ -389,6 +389,10 @@ WebTorrent.prototype._remove = function (torrentId, cb) {
var torrent = this.get(torrentId)
if (!torrent) return
this.torrents.splice(this.torrents.indexOf(torrent), 1)
// clear hash entity in cache to be able use pears search again
if (this.dht) {
this.dht._tables.remove(torrent.infoHash)
}
torrent.destroy(cb)
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.