Skip to content

Commit ff7323c

Browse files
committed
Narrow scope of NETSTANDARD1_3 block.
1 parent b8faf6e commit ff7323c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/MySqlConnector/Core/ServerSession.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,19 +625,19 @@ private async Task<bool> OpenTcpSocketAsync(ConnectionSettings cs, ILoadBalancer
625625
IPAddress[] ipAddresses;
626626
try
627627
{
628-
#if NETSTANDARD1_3
629-
// Dns.GetHostAddresses isn't available until netstandard 2.0: https://github.com/dotnet/corefx/pull/11950
630-
ipAddresses = await Dns.GetHostAddressesAsync(hostName).ConfigureAwait(false);
631-
#else
632628
if (ioBehavior == IOBehavior.Asynchronous)
633629
{
634630
ipAddresses = await Dns.GetHostAddressesAsync(hostName).ConfigureAwait(false);
635631
}
636632
else
637633
{
634+
#if NETSTANDARD1_3
635+
// Dns.GetHostAddresses isn't available until netstandard 2.0: https://github.com/dotnet/corefx/pull/11950
636+
ipAddresses = await Dns.GetHostAddressesAsync(hostName).ConfigureAwait(false);
637+
#else
638638
ipAddresses = Dns.GetHostAddresses(hostName);
639-
}
640639
#endif
640+
}
641641
}
642642
catch (SocketException)
643643
{

0 commit comments

Comments
 (0)