Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error emitted on failed connection #513

Closed
MatthewPhinney opened this issue Feb 23, 2017 · 5 comments
Closed

No error emitted on failed connection #513

MatthewPhinney opened this issue Feb 23, 2017 · 5 comments

Comments

@MatthewPhinney
Copy link

If a SQL Server database is configured to use encrypted connections, the client must specify encrypt: true in the tedious connection config. If the client does not specify encrypt: true, the connection to the database fails, but the connection object does not emit an error event.
The connection should emit an error, so the client can handle it appropriately.

Here is sample output from a connection attempt:

Debug event:  connected to <db-using-encrypted-connections>
Debug event:  State change: Connecting -> SentPrelogin
Debug event:  State change: SentPrelogin -> SentTLSSSLNegotiation
Debug event:  socket ended
Debug event:  State change: SentTLSSSLNegotiation -> Final
End event:    undefined
Debug event:  State is already Final
Debug event:  socket ended
Debug event:  connection to <db-using-encrypted-connections> closed

Incidentally, TLS.createSecurePair is deprecated. Is there any plan to update this code?

@tvrprasad
Copy link
Contributor

Thanks for reporting.
Sent pull request to address this: #514

@tvrprasad
Copy link
Contributor

About the deprecated createSecurePair, there is a open issue for that - #135. Need someone inspired to take it on :-)

@MatthewPhinney
Copy link
Author

Thanks for the quick response -- please let me know when a new version (including the changes in #514) is published on npm.

@tvrprasad
Copy link
Contributor

Stay tuned :-)

@tvrprasad
Copy link
Contributor

The PR is merged. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants