mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
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…
x
Reference in New Issue
Block a user