不要怂,就是干,撸起袖子干!

Commit 16523b00 by Mick Hansen

Merge pull request #2453 from findhit/hotfix/mysql-connection-validate

dialects.mysql.connection-manager: Use `connection._protocol._ended` state on $validate
2 parents d3bf7240 3dc40eb4
Showing with 1 additions and 1 deletions
...@@ -74,7 +74,7 @@ ConnectionManager.prototype.disconnect = function(connection) { ...@@ -74,7 +74,7 @@ ConnectionManager.prototype.disconnect = function(connection) {
}); });
}; };
ConnectionManager.prototype.validate = function(connection) { ConnectionManager.prototype.validate = function(connection) {
return connection && connection.state !== 'disconnected'; return connection && ['disconnected', 'protocol_error'].indexOf(connection.state) !== -1;
}; };
module.exports = ConnectionManager; module.exports = ConnectionManager;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!