Skip to content

Commit 86af6dd

Browse files
committed
Dont release Zalgo
When calling pool.end(cb) cb is sometimes called synchronously and other times asynchronously.
1 parent aa3518c commit 86af6dd

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)