@@ -51,7 +51,7 @@ public void TryGetAddrInfo_LocalHost(bool justAddresses)
51
51
public void TryGetAddrInfo_EmptyHost ( bool justAddresses )
52
52
{
53
53
SocketError error = NameResolutionPal . TryGetAddrInfo ( "" , justAddresses , AddressFamily . Unspecified , out string hostName , out string [ ] aliases , out IPAddress [ ] addresses , out int nativeErrorCode ) ;
54
- if ( error == SocketError . HostNotFound && ( OperatingSystem . IsLinux ( ) || OperatingSystem . IsMacOS ( ) ) )
54
+ if ( error == SocketError . HostNotFound && ! OperatingSystem . IsWindows ( ) )
55
55
{
56
56
// On Unix, we are not guaranteed to be able to resove the local host. The ability to do so depends on the
57
57
// machine configurations, which varies by distro and is often inconsistent.
@@ -78,7 +78,7 @@ public void TryGetAddrInfo_HostName(bool justAddresses)
78
78
Assert . NotNull ( hostName ) ;
79
79
80
80
SocketError error = NameResolutionPal . TryGetAddrInfo ( hostName , justAddresses , AddressFamily . Unspecified , out hostName , out string [ ] aliases , out IPAddress [ ] addresses , out int nativeErrorCode ) ;
81
- if ( error == SocketError . HostNotFound && ( OperatingSystem . IsLinux ( ) || OperatingSystem . IsMacOS ( ) ) )
81
+ if ( error == SocketError . HostNotFound && ! OperatingSystem . IsWindows ( ) )
82
82
{
83
83
// On Unix, we are not guaranteed to be able to resove the local host. The ability to do so depends on the
84
84
// machine configurations, which varies by distro and is often inconsistent.
@@ -289,7 +289,7 @@ public async Task GetAddrInfoAsync_EmptyHost(bool justAddresses)
289
289
{
290
290
SocketError error = ex . SocketErrorCode ;
291
291
292
- if ( error == SocketError . HostNotFound && ( OperatingSystem . IsLinux ( ) || OperatingSystem . IsMacOS ( ) ) )
292
+ if ( error == SocketError . HostNotFound && ! OperatingSystem . IsWindows ( ) )
293
293
{
294
294
// On Unix, we are not guaranteed to be able to resove the local host. The ability to do so depends on the
295
295
// machine configurations, which varies by distro and is often inconsistent.
@@ -339,7 +339,7 @@ public async Task GetAddrInfoAsync_HostName(bool justAddresses)
339
339
{
340
340
SocketError error = ex . SocketErrorCode ;
341
341
342
- if ( error == SocketError . HostNotFound && ( OperatingSystem . IsLinux ( ) || OperatingSystem . IsMacOS ( ) ) )
342
+ if ( error == SocketError . HostNotFound && ! OperatingSystem . IsWindows ( ) )
343
343
{
344
344
// On Unix, we are not guaranteed to be able to resove the local host. The ability to do so depends on the
345
345
// machine configurations, which varies by distro and is often inconsistent.
0 commit comments