@@ -384,8 +384,6 @@ internal void Connect(ServerInfo serverInfo,
384
384
385
385
uint sniStatus = TdsParserStateObjectFactory.Singleton.SNIStatus;
386
386
387
- string[] serverSpn = null;
388
-
389
387
if (sniStatus != TdsEnums.SNI_SUCCESS)
390
388
{
391
389
_physicalStateObj.AddError(ProcessSNIError(_physicalStateObj));
@@ -395,7 +393,6 @@ internal void Connect(ServerInfo serverInfo,
395
393
}
396
394
else
397
395
{
398
- serverSpn = null;
399
396
SqlClientEventSource.Log.TryTraceEvent("TdsParser.Connect | SEC | Connection Object Id {0}, Authentication Mode: {1}", _connHandler.ObjectID,
400
397
authType == SqlAuthenticationMethod.NotSpecified ? SqlAuthenticationMethod.SqlPassword.ToString() : authType.ToString());
401
398
}
@@ -407,7 +404,6 @@ internal void Connect(ServerInfo serverInfo,
407
404
SqlClientEventSource.Log.TryTraceEvent("<sc.TdsParser.Connect|SEC> Encryption will be disabled as target server is a SQL Local DB instance.");
408
405
}
409
406
410
- serverSpn = null;
411
407
_authenticationProvider = null;
412
408
413
409
// AD Integrated behaves like Windows integrated when connecting to a non-fedAuth server
@@ -441,6 +437,8 @@ internal void Connect(ServerInfo serverInfo,
441
437
442
438
_connHandler.pendingSQLDNSObject = null;
443
439
440
+ string[] serverSpn = null;
441
+
444
442
// AD Integrated behaves like Windows integrated when connecting to a non-fedAuth server
445
443
_physicalStateObj.CreatePhysicalSNIHandle(
446
444
serverInfo.ExtendedServerName,
0 commit comments