mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
destroyAllNow also has a callback
This commit is contained in:
parent
382d6d66f9
commit
85c28e9088
11
lib/index.js
11
lib/index.js
@ -25,11 +25,12 @@ PG.prototype.end = function() {
|
||||
var pool = self.pools.all[key];
|
||||
delete self.pools.all[key];
|
||||
pool.drain(function() {
|
||||
pool.destroyAllNow();
|
||||
count--;
|
||||
if(count === 0) {
|
||||
self.emit('ended');
|
||||
}
|
||||
pool.destroyAllNow(function() {
|
||||
count--;
|
||||
if(count === 0) {
|
||||
self.emit('ended');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user