[Modify] Polish it

This commit is contained in:
sta 2021-09-21 19:46:33 +09:00
parent cf50e89001
commit 7fe5be2535

View File

@ -528,8 +528,11 @@ namespace WebSocketSharp.Server
lock (_sync) {
WebSocketServiceHost host;
if (_hosts.TryGetValue (path, out host))
throw new ArgumentException ("It is already in use.", "path");
if (_hosts.TryGetValue (path, out host)) {
var msg = "It is already in use.";
throw new ArgumentException (msg, "path");
}
host = new WebSocketServiceHost<TBehavior> (
path, () => new TBehavior (), initializer, _log