mysql2 3.22.3 → 3.22.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/base/pool.js +4 -0
  2. package/package.json +1 -1
package/lib/base/pool.js CHANGED
@@ -185,6 +185,10 @@ class BasePool extends EventEmitter {
185
185
  }
186
186
  };
187
187
  }
188
+ while (this._connectionQueue.length > 0) {
189
+ const queuedCallback = this._connectionQueue.shift();
190
+ process.nextTick(() => queuedCallback(new Error('Pool is closed.')));
191
+ }
188
192
  let calledBack = false;
189
193
  let closedConnections = 0;
190
194
  let connection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mysql2",
3
- "version": "3.22.3",
3
+ "version": "3.22.4",
4
4
  "description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",
5
5
  "main": "index.js",
6
6
  "typings": "typings/mysql/index",