Skip to content

Commit 0632c4e

Browse files
committed
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.
1 parent 3f4a44e commit 0632c4e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: lib/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ PG.prototype.end = function() {
2222
var self = this;
2323
Object.keys(self.pools.all).forEach(function(key) {
2424
var pool = self.pools.all[key];
25+
delete self.pools.all[key];
2526
pool.drain(function() {
2627
pool.destroyAllNow();
2728
});

0 commit comments

Comments
 (0)