Update Fix
This commit is contained in:
11
node_modules/mysql2/lib/base/pool_connection.js
generated
vendored
11
node_modules/mysql2/lib/base/pool_connection.js
generated
vendored
@@ -29,10 +29,14 @@ class BasePoolConnection extends BaseConnection {
|
||||
this._pool.releaseConnection(this);
|
||||
}
|
||||
|
||||
end() {
|
||||
[Symbol.dispose]() {
|
||||
this.release();
|
||||
}
|
||||
|
||||
end(callback) {
|
||||
if (this.config.gracefulEnd) {
|
||||
this._removeFromPool();
|
||||
super.end();
|
||||
super.end(callback);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -46,6 +50,9 @@ class BasePoolConnection extends BaseConnection {
|
||||
this.emit('warn', err);
|
||||
console.warn(err.message);
|
||||
this.release();
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
destroy() {
|
||||
|
||||
Reference in New Issue
Block a user