Fix uncaught exception during shutdown on update
This commit is contained in:
parent
504a967be1
commit
bcd79cf17d
1 changed files with 4 additions and 1 deletions
|
@ -67,7 +67,10 @@ async function start(options = {}) {
|
|||
}
|
||||
|
||||
async function stop() {
|
||||
logger.info('attachment_downloads/stop: disabling');
|
||||
// If `.start()` wasn't called - the `logger` is `undefined`
|
||||
if (logger) {
|
||||
logger.info('attachment_downloads/stop: disabling');
|
||||
}
|
||||
enabled = false;
|
||||
if (timeout) {
|
||||
clearTimeout(timeout);
|
||||
|
|
Loading…
Reference in a new issue