Skip to content

Commit

Permalink
Hit the error callback in the next tick
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Burke committed Mar 17, 2016
1 parent 5e4bf20 commit 295e00a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/generic-pool.js
Expand Up @@ -404,7 +404,9 @@ Pool.prototype.acquire = function acquire (callback, priority, options) {
return false
} else if (options.timeout === 0) {
if (this._isFull()) {
callback(fullError)
process.nextTick(function() {
callback(fullError)
})
return false
}
} else {
Expand Down

0 comments on commit 295e00a

Please sign in to comment.