Skip to content

Commit c8dc49e

Browse files
geoffkizerGeoffrey Kizer
andauthored
fix IPAddress equality comparison (#57250)
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
1 parent e62b82a commit c8dc49e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicAddressHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ internal static unsafe IPEndPoint INetToIPEndPoint(ref SOCKADDR_INET inetAddress
2424
internal static unsafe SOCKADDR_INET IPEndPointToINet(IPEndPoint endpoint)
2525
{
2626
SOCKADDR_INET socketAddress = default;
27-
if (endpoint.Address != IPAddress.Any && endpoint.Address != IPAddress.IPv6Any)
27+
if (!endpoint.Address.Equals(IPAddress.Any) && !endpoint.Address.Equals(IPAddress.IPv6Any))
2828
{
2929
switch (endpoint.Address.AddressFamily)
3030
{

0 commit comments

Comments
 (0)