diff --git a/lib/Pool.js b/lib/Pool.js index 7c5400d5f..391b90968 100644 --- a/lib/Pool.js +++ b/lib/Pool.js @@ -110,7 +110,7 @@ Pool.prototype.end = function (cb) { }.bind(this); if (this._allConnections.length === 0) { - return endCB(); + return process.nextTick(endCB); } for (var i = 0; i < this._allConnections.length; i++) {