-
Notifications
You must be signed in to change notification settings - Fork 317
Closed
Description
Describe the bug
When opening a connection with SqlConnection.OpenAsync(), transient fault handling is not enabled.
Test with placing breakpoints on below locations:
SqlClient/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
Line 1859 in a5ad838
| _applyTransientFaultHandling = (!overrides.HasFlag(SqlConnectionOverrides.OpenWithoutRetry) && retry == null && connectionOptions != null && connectionOptions.ConnectRetryCount > 0); |
SqlClient/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
Line 1888 in a5ad838
| _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.
lcheunglci
Metadata
Metadata
Assignees
Labels
No labels