Skip to content

Commit

Permalink
Don't treat "0.0.0.0" as a discoverable host name, zyanfx#71.
Browse files Browse the repository at this point in the history
  • Loading branch information
yallie authored and Mikhail Kanygin committed Sep 2, 2020
1 parent 311ddab commit 0f3a843
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/Zyan.Communication/Protocols/ServerProtocolSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ protected virtual bool IsDiscoverableUrl(string url)
// everything but loopback is discoverable
var uri = new Uri(url);
var host = uri.Host.ToLower();
return host != "localhost" && host != IPAddress.Loopback.ToString() && host != IPAddress.IPv6Loopback.ToString();
return
host != "localhost" &&
host != "0.0.0.0" &&
host != IPAddress.Loopback.ToString() &&
host != IPAddress.IPv6Loopback.ToString();
}
catch (UriFormatException)
{
Expand Down

0 comments on commit 0f3a843

Please sign in to comment.