Skip to content

Commit ba47cd8

Browse files
committed
Merge pull request #711 from christiaan/patch-1
pool.end(cb) sometimes calles cb direcly other times sometime later
2 parents aa3518c + 86af6dd commit ba47cd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Pool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Pool.prototype.end = function (cb) {
110110
}.bind(this);
111111

112112
if (this._allConnections.length === 0) {
113-
return endCB();
113+
return process.nextTick(endCB);
114114
}
115115

116116
for (var i = 0; i < this._allConnections.length; i++) {

0 commit comments

Comments
 (0)