[Modify] Polish it

This commit is contained in:
sta 2017-02-06 16:53:35 +09:00
parent 25d6f98fed
commit 6f89be6319

View File

@ -311,19 +311,14 @@ namespace WebSocketSharp.Server
} }
} }
internal bool InternalTryGetServiceHost (string path, out WebSocketServiceHost host) internal bool InternalTryGetServiceHost (
string path, out WebSocketServiceHost host
)
{ {
bool ret;
lock (_sync) { lock (_sync) {
path = HttpUtility.UrlDecode (path).TrimEndSlash (); path = HttpUtility.UrlDecode (path).TrimEndSlash ();
ret = _hosts.TryGetValue (path, out host); return _hosts.TryGetValue (path, out host);
} }
if (!ret)
_logger.Error (
"A WebSocket service with the specified path isn't found:\n path: " + path);
return ret;
} }
internal bool Remove (string path) internal bool Remove (string path)