Skip to content

Commit da76a2f

Browse files
committed
use purgeConnection instead of destroy on restoreUser error
1 parent 1c32713 commit da76a2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Pool.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Pool.prototype.releaseConnection = function releaseConnection(connection) {
111111
if (connection._purge) {
112112
// restore the switched user
113113
this.restoreUser(connection, function (err) {
114-
if (err) return connection.destroy();
114+
if (err) return this._purgeConnection(connection);
115115
connection._pool.releaseConnection(connection);
116116
});
117117
return;

0 commit comments

Comments
 (0)