Fix uncaught exception during shutdown on update

This commit is contained in:
Fedor Indutny
2021-05-06 14:32:23 -07:00
committed by GitHub
parent 504a967be1
commit bcd79cf17d

View File

@@ -67,7 +67,10 @@ async function start(options = {}) {
}
async function stop() {
// If `.start()` wasn't called - the `logger` is `undefined`
if (logger) {
logger.info('attachment_downloads/stop: disabling');
}
enabled = false;
if (timeout) {
clearTimeout(timeout);