Skip to content

Commit

Permalink
fix IPAddress equality comparison (#57250)
Browse files Browse the repository at this point in the history
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
  • Loading branch information
geoffkizer and Geoffrey Kizer authored Aug 12, 2021
1 parent e62b82a commit c8dc49e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal static unsafe IPEndPoint INetToIPEndPoint(ref SOCKADDR_INET inetAddress
internal static unsafe SOCKADDR_INET IPEndPointToINet(IPEndPoint endpoint)
{
SOCKADDR_INET socketAddress = default;
if (endpoint.Address != IPAddress.Any && endpoint.Address != IPAddress.IPv6Any)
if (!endpoint.Address.Equals(IPAddress.Any) && !endpoint.Address.Equals(IPAddress.IPv6Any))
{
switch (endpoint.Address.AddressFamily)
{
Expand Down

0 comments on commit c8dc49e

Please sign in to comment.