Skip to content

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

@cheenamalhotra

Description

@cheenamalhotra

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions