destroyAllNow also has a callback
This commit is contained in:
parent
382d6d66f9
commit
85c28e9088
@ -25,13 +25,14 @@ PG.prototype.end = function() {
|
||||
var pool = self.pools.all[key];
|
||||
delete self.pools.all[key];
|
||||
pool.drain(function() {
|
||||
pool.destroyAllNow();
|
||||
pool.destroyAllNow(function() {
|
||||
count--;
|
||||
if(count === 0) {
|
||||
self.emit('ended');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user