/app/sa/node_modules/webtorrent/index.js:424
if (!torrent) throw new Error(`No torrent with id ${torrentId}`)
^
Error: No torrent with id [object Object]
at WebTorrent.remove (/app/sa/node_modules/webtorrent/index.js:424:25)
at WebTorrent.remove (/app/sa/node_modules/webtorrent/index.js:420:49)
at Bugout.destroy (/app/sa/node_modules/bugout/index.js:159:13)
at Connector.healthCheckRealaytorConnection (/app/sa/src/connector.js:200:17)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)
Seems webtorrent thows an error when we call remove() with a wrong id.
(for reference Line 407
I faced above error , in a reconection mechanism i have implemented in my app , so im calling bugout destroy() in an interval..
It works as expected , except this crash..
Sounds good, send a PR if you want. I can merge it but I don't want to push anything to npm without basic browser testing and I don't really have time to do this myself.
Seems webtorrent thows an error when we call remove() with a wrong id. (for reference Line 407
We need to prevent it , maybe we can include this line inside a try catch : https://github.com/chr15m/bugout/blob/62ddbc85365fc508eddcb8d5ab3a35b3ed000712/index.js#L159
I faced above error , in a reconection mechanism i have implemented in my app , so im calling bugout destroy() in an interval.. It works as expected , except this crash..