diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs index e977641175..4e0035f020 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs @@ -1911,7 +1911,8 @@ private void AttemptOneLogin( ignoreSniOpenTimeout, timeout.LegacyTimerExpire, ConnectionOptions, - withFailover); + withFailover, + Connection.IsAsyncPipeOption); _timeoutErrorInternal.EndPhase(SqlConnectionTimeoutErrorPhase.ConsumePreLoginHandshake); _timeoutErrorInternal.SetAndBeginPhase(SqlConnectionTimeoutErrorPhase.LoginBegin); diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs index a1692e9868..913377adea 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs @@ -364,7 +364,8 @@ internal void Connect( bool ignoreSniOpenTimeout, long timerExpire, SqlConnectionString connectionOptions, - bool withFailover) + bool withFailover, + bool isAsyncPipeOption) { SqlConnectionEncryptOption encrypt = connectionOptions.Encrypt; bool isTlsFirst = (encrypt == SqlConnectionEncryptOption.Strict); @@ -451,7 +452,7 @@ internal void Connect( out instanceName, ref _sniSpnBuffer, false, - async: true, + async: isAsyncPipeOption, fParallel, _connHandler.ConnectionOptions.IPAddressPreference, FQDNforDNSCache, @@ -550,7 +551,7 @@ internal void Connect( out instanceName, ref _sniSpnBuffer, true, - async: true, + async: isAsyncPipeOption, fParallel, _connHandler.ConnectionOptions.IPAddressPreference, FQDNforDNSCache,