[Modify] Polish it
This commit is contained in:
parent
cf50e89001
commit
7fe5be2535
@ -528,8 +528,11 @@ namespace WebSocketSharp.Server
|
|||||||
lock (_sync) {
|
lock (_sync) {
|
||||||
WebSocketServiceHost host;
|
WebSocketServiceHost host;
|
||||||
|
|
||||||
if (_hosts.TryGetValue (path, out host))
|
if (_hosts.TryGetValue (path, out host)) {
|
||||||
throw new ArgumentException ("It is already in use.", "path");
|
var msg = "It is already in use.";
|
||||||
|
|
||||||
|
throw new ArgumentException (msg, "path");
|
||||||
|
}
|
||||||
|
|
||||||
host = new WebSocketServiceHost<TBehavior> (
|
host = new WebSocketServiceHost<TBehavior> (
|
||||||
path, () => new TBehavior (), initializer, _log
|
path, () => new TBehavior (), initializer, _log
|
||||||
|
Loading…
Reference in New Issue
Block a user