Skip to content

Commit bdfa5d8

Browse files
author
Javad Rahnama
authored
Regression | Revert PR #2281 SNIProxy code change (#2395)
1 parent 4e23bf9 commit bdfa5d8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIProxy.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -653,10 +653,10 @@ private bool InferConnectionDetails()
653653

654654
Port = port;
655655
}
656-
// Instance Name Handling.
657-
if (backSlashIndex > -1)
656+
// Instance Name Handling. Only if we found a '\' and we did not find a port in the Data Source
657+
else if (backSlashIndex > -1)
658658
{
659-
// This means that there is a part separated by '\'
659+
// This means that there will not be any part separated by comma.
660660
InstanceName = tokensByCommaAndSlash[1].Trim();
661661

662662
if (string.IsNullOrWhiteSpace(InstanceName))

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/InstanceNameTest/InstanceNameTest.cs

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public static void ConnectManagedWithInstanceNameTest(bool useMultiSubnetFailove
8787
}
8888

8989
#if NETCOREAPP
90+
[ActiveIssue("27824")] // When specifying instance name and port number, this method call always returns false
9091
[ConditionalFact(nameof(IsSPNPortNumberTestForTCP))]
9192
public static void PortNumberInSPNTestForTCP()
9293
{

0 commit comments

Comments
 (0)