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

Transient Fault Handling is disabled by default with SqlConnection.OpenAsync() #1982

Closed
cheenamalhotra opened this issue Apr 5, 2023 · 1 comment · Fixed by #1983
Closed

Comments

@cheenamalhotra
Copy link
Member

Describe the bug

When opening a connection with SqlConnection.OpenAsync(), transient fault handling is not enabled.
Test with placing breakpoints on below locations:

_applyTransientFaultHandling = (!overrides.HasFlag(SqlConnectionOverrides.OpenWithoutRetry) && retry == null && connectionOptions != null && connectionOptions.ConnectRetryCount > 0);

_applyTransientFaultHandling = (retry == null && connectionOptions != null && connectionOptions.ConnectRetryCount > 0);

_applyTransientFaultHandling is set to false as retry is not null in this method when opening connection asynchronously.
When opening connection with Open(), _applyTransientFaultHandling is set to true as expected.

@David-Engel
Copy link
Contributor

Thanks for filing the issue and submitting a PR for the fix!

@JRahnama JRahnama moved this from Needs triage to Under Investigation in SqlClient Triage Board Apr 12, 2023
@DavoudEshtehari DavoudEshtehari linked a pull request Apr 14, 2023 that will close this issue
SqlClient Triage Board automation moved this from Under Investigation to Closed Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants