Skip to content

Commit

Permalink
Merge pull request #1359 from gabegorelick/unhandled-promise-warning
Browse files Browse the repository at this point in the history
fix: unhandled promise warning
  • Loading branch information
manast committed Jul 9, 2019
2 parents 9a63fbf + 253df23 commit 79b1cbf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,11 @@ Queue.prototype.updateDelayTimer = function() {
// or the next guard time
this.delayTimer = setTimeout(() => this.updateDelayTimer(), delay);
}

// Silence warnings about promise created but not returned.
// This isn't an issue since we emit errors.
// See http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-created-in-a-handler-but-was-not-returned-from-it
return null;
})
.catch(err => {
this.emit('error', err, 'Error updating the delay timer');
Expand Down

0 comments on commit 79b1cbf

Please sign in to comment.