You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When connecting to a database, it is possible that a 'socketConnect' event is emitted even after the connection had already timed out. As a result we get a unhandled exception that crashes the whole node application:
Error: No event 'socketConnect' in state 'Final'
at Connection.dispatchEvent ([...]/mssql/node_modules/tedious/lib/connection.js:859:28)
at Connection.socketConnect ([...]/mssql/node_modules/tedious/lib/connection.js:883:19)
at [...]/mssql/node_modules/tedious/lib/connection.js:755:16
at Socket.onConnect ([...]/mssql/node_modules/tedious/lib/connector.js:176:9)
at emitNone (events.js:67:13)
at Socket.emit (events.js:166:7)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1068:10)
The error can be reliably reproduced be setting the connectTimout to 1 ms.
A possible solution for this problem would be to check the connection state (if it already transitioned to state FINAL) just before calling socketConnect.
The text was updated successfully, but these errors were encountered:
Node version: 8.7.0
Tedious version: 2.1.5
When connecting to a database, it is possible that a 'socketConnect' event is emitted even after the connection had already timed out. As a result we get a unhandled exception that crashes the whole node application:
The error can be reliably reproduced be setting the connectTimout to 1 ms.
A possible solution for this problem would be to check the connection state (if it already transitioned to state FINAL) just before calling socketConnect.
The text was updated successfully, but these errors were encountered: