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

SqlRetryLogicProvider.cs is missing ConfigureAwait(false) on it's awaits #1207

Closed
alexander-webber opened this issue Aug 11, 2021 · 4 comments · Fixed by #1220
Closed

SqlRetryLogicProvider.cs is missing ConfigureAwait(false) on it's awaits #1207

alexander-webber opened this issue Aug 11, 2021 · 4 comments · Fixed by #1220
Assignees

Comments

@alexander-webber
Copy link

SqlRetryLogicProvider.cs is missing ConfigureAwait(false) on it's awaits which is causing us pains with async deadlocks in web contexts. Is this by design for some reason, if not could you add them, at the moment we have to roll our own, pretty much identical custom retry classes just to work around this issue.

@roji
Copy link
Member

roji commented Aug 11, 2021

Note that the compiler now includes a diagnostic to check for any await which isn't covered by ConfigureAwait(false) - it's a very good idea to enable this for any library. This is as simple as dropping the following in an .editorconfig into the solution:

# CA2007: Consider calling ConfigureAwait on the awaited task
dotnet_diagnostic.CA2007.severity = error

@DavoudEshtehari
Copy link
Contributor

Thanks @alexander-webber for raising it here. We'll check and fix it.

@DavoudEshtehari DavoudEshtehari self-assigned this Aug 11, 2021
@JRahnama JRahnama added this to the 4.0.0-preview1 milestone Aug 11, 2021
@DavoudEshtehari
Copy link
Contributor

@alexander-webber I'd appreciate it if you could share a repro app for more investigation and finding other possible issues in the driver.

@cheenamalhotra
Copy link
Member

Hi @alexander-webber

PR #1220 shall address this 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
5 participants