We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceac088 commit fb4a07eCopy full SHA for fb4a07e
websocket-sharp/Server/HttpServer.cs
@@ -161,9 +161,17 @@ public HttpServer (string url)
161
throw new ArgumentException (msg, "url");
162
163
var host = getHost (uri);
164
+
165
var addr = host.ToIPAddress ();
- if (!addr.IsLocal ())
166
- throw new ArgumentException ("The host part isn't a local host name: " + url, "url");
+ if (addr == null) {
167
+ msg = "The host part could not be converted to an IP address.";
168
+ throw new ArgumentException (msg, "url");
169
+ }
170
171
+ if (!addr.IsLocal ()) {
172
+ msg = "The IP address of the host is not a local IP address.";
173
174
175
176
init (host, addr, uri.Port, uri.Scheme == "https");
177
}
0 commit comments