-
Notifications
You must be signed in to change notification settings - Fork 332
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
Expected state to be Connected but was Failed #433
Comments
Is your code something like the following?
|
Fixed in 0.36.0. |
I get this error with 0.36.1: System.InvalidOperationException: Expected state to be Connected but was Failed. |
@kwaazaar Can you open a new issue with more details about the problem, including your calling code (not just a stack trace)? |
The MySqlConnection object always seem to return a State of open even when connection is lost. My code currently checks this before querying to attempt an auto-reconnect. This code worked fine with the older MySql.Data connector.
I'm sure I saw an issue which said this bug was fixed, but I'm still getting it in NuGet version 0.35.0.
Symptoms:
MySqlConnection.State is always Open even when connection is lost
How to trigger
Connect to MySQL then shutdown server while application is running, causing the connection to drop. Start up MySQL server again does not resolve issue as user code thinks state is still Open.
Stack Trace:
The text was updated successfully, but these errors were encountered: