Skip to content

Commit be37756

Browse files
committed
Merge pull request #395 from aaronyo/master
Unable to reconnect after calling pg.end()
2 parents bf0c4bf + 0632c4e commit be37756

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)