remove reference to pool when destroying
Leaving a reference to the pool means the destroyed pool will get returned if you later try to reconnect with the same connection string.
This commit is contained in:
parent
3f4a44e973
commit
0632c4eaf4
@ -22,6 +22,7 @@ PG.prototype.end = function() {
|
||||
var self = this;
|
||||
Object.keys(self.pools.all).forEach(function(key) {
|
||||
var pool = self.pools.all[key];
|
||||
delete self.pools.all[key];
|
||||
pool.drain(function() {
|
||||
pool.destroyAllNow();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user