-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
Hey , i have noticed this weird exception that crashes my app using bugout.
This happens on scenarios that network connectivity is under restoring its state back to online , for example after a laptop hibernation.
Line 112 in 62ddbc8
if (this.torrent.discovery.tracker) { |
/home/t13/Documents/proj/app/node_modules/bugout/index.js:112
if (this.torrent.discovery.tracker) {
^
TypeError: Cannot read properties of null (reading 'tracker')
at Bugout._onTorrent (/home/t13/Documents/proj/app/node_modules/bugout/index.js:112:30)
at /home/t13/Documents/proj/app/node_modules/bugout/index.js:96:14
at /home/t13/Documents/proj/app/node_modules/bugout/index.js:505:15
at _onseed (/home/t13/Documents/proj/app/node_modules/webtorrent/index.js:364:41)
at /home/t13/Documents/proj/app/node_modules/webtorrent/index.js:358:9
at end (/home/t13/Documents/proj/app/node_modules/run-parallel/index.js:21:15)
at done (/home/t13/Documents/proj/app/node_modules/run-parallel/index.js:25:10)
at each (/home/t13/Documents/proj/app/node_modules/run-parallel/index.js:31:7)
at Torrent.<anonymous> (/home/t13/Documents/proj/app/node_modules/run-parallel/index.js:46:37)
at Object.onceWrapper (node:events:628:28)
Node.js v20.5.0
error Command failed with exit code 1.
Solution to that could be as easy as that :
if (this?.torrent?.discovery?.tracker) {
Let me know your thoughts on this..
chr15m
Metadata
Metadata
Assignees
Labels
No labels