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

Set MySqlException error number when SSL exception happens #647

Closed
bgrainger opened this issue May 28, 2019 · 2 comments
Closed

Set MySqlException error number when SSL exception happens #647

bgrainger opened this issue May 28, 2019 · 2 comments

Comments

@bgrainger
Copy link
Member

@bgrainger bgrainger commented May 28, 2019

When SslStream.AuthenticateAsClientAsync fails, a MySqlException with error code 0 is thrown. It should be MySqlErrorCode.UnableToConnectToHost.

Note that this will break some clients that are currently detecting error code 0: #621 (comment)

In general, all exceptions along the connection path should use UnableToConnectToHost.

@bgrainger
Copy link
Member Author

@bgrainger bgrainger commented Jun 18, 2019

Adding MySqlErrorCode.UnableToConnectToHost in many more places, except when the client connection string is clearly bad (e.g., specifying a client key file that doesn't exist); these seem like "more fatal" errors that can't be fixed by retrying. There didn't seem to be an existing appropriate MySqlErrorCode value for these exceptions.

@bgrainger
Copy link
Member Author

@bgrainger bgrainger commented Sep 24, 2019

Fixed in 0.57.0.

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

No branches or pull requests

1 participant