From ebacd764128bcd463a350478b3897dc4742f3a82 Mon Sep 17 00:00:00 2001 From: Gabe Gorelick Date: Wed, 11 Dec 2019 15:25:58 -0500 Subject: [PATCH] fix: whenCurrentJobsFinished should wait for all jobs See https://github.com/OptimalBits/bull/pull/1542/files#r356810178 --- lib/queue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/queue.js b/lib/queue.js index 30233c070..2c6ab79c6 100755 --- a/lib/queue.js +++ b/lib/queue.js @@ -1191,7 +1191,7 @@ Queue.prototype.whenCurrentJobsFinished = function() { return this.bclient.connect(); }); - return Promise.all([this.processing[0]]).then(() => { + return Promise.all(this.processing).then(() => { return forcedReconnection; }); };