fix: catch pause errors when closing

This commit is contained in:
Manuel Astudillo
2023-10-14 12:00:41 +02:00
parent 4d197e8177
commit ccb6cc7ecc
+1
View File
@@ -593,6 +593,7 @@ Queue.prototype.close = function(doNotWaitJobs) {
isReady = false;
})
.then(() => isReady && this.pause(true, doNotWaitJobs))
.catch(() => void 0) // Ignore possible error from pause
.finally(() => this._clearTimers())
.then(() => {
if (!this.childPool) {