We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 589a833 commit 1fcba72Copy full SHA for 1fcba72
lib/Pool.js
@@ -111,7 +111,7 @@ Pool.prototype.releaseConnection = function releaseConnection(connection) {
111
if (connection._purge) {
112
// restore the switched user
113
this.restoreUser(connection, function (err) {
114
- if (err) return connection.destroy();
+ if (err) return this._purgeConnection(connection);
115
connection._pool.releaseConnection(connection);
116
});
117
return;
0 commit comments