Skip to content

Commit 3709bf0

Browse files
Eugene Shilinsushantdhiman
authored andcommitted
fix(mysql): mark closed sockets invalid (#8112)
1 parent 8bed06a commit 3709bf0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/dialects/mysql/connection-manager.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ class ConnectionManager extends AbstractConnectionManager {
168168
}
169169

170170
validate(connection) {
171-
return connection && connection._fatalError === null && connection._protocolError === null && !connection._closing;
171+
return connection && connection._fatalError === null && connection._protocolError === null && !connection._closing &&
172+
!connection.stream.destroyed;
172173
}
173174
}
174175

0 commit comments

Comments
 (0)