diff --git a/lib/index.js b/lib/index.js index 5f1cea07..423c3ed3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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(); });