Modified some error messages in Ext.cs and WebSocketServer.cs

This commit is contained in:
sta
2014-09-02 13:58:40 +09:00
parent d9528ffe75
commit faaa2e1939
2 changed files with 10 additions and 11 deletions

View File

@@ -147,10 +147,9 @@ namespace WebSocketSharp.Server
if (!tryCreateUri (url, out _uri, out msg))
throw new ArgumentException (msg, "url");
var host = _uri.DnsSafeHost;
_address = host.ToIPAddress ();
_address = _uri.DnsSafeHost.ToIPAddress ();
if (_address == null || !_address.IsLocal ())
throw new ArgumentException ("The host part isn't a local host name: " + host, "url");
throw new ArgumentException ("The host part isn't a local host name: " + url, "url");
_port = _uri.Port;
_secure = _uri.Scheme == "wss";