We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b44c61 commit d79eb8bCopy full SHA for d79eb8b
lib/pool/BaseConnectionPool.js
@@ -150,13 +150,14 @@ class BaseConnectionPool {
150
let openConnections = this.size;
151
this.connections.forEach((connection) => {
152
connection.close(() => {
153
- if (--openConnections === 0) {
154
- this.connections = [];
155
- this.size = this.connections.length;
156
- callback();
157
- }
+ openConnections--;
158
});
159
+ if (openConnections === 0) {
+ this.connections = [];
+ this.size = this.connections.length;
+ callback();
160
+ }
161
}
162
163
/**
0 commit comments