|
|
|
@ -289,15 +289,11 @@ namespace WebSocketSharp.Server
|
|
|
|
|
|
|
|
|
|
|
|
lock (_sync) {
|
|
|
|
lock (_sync) {
|
|
|
|
WebSocketServiceHost host;
|
|
|
|
WebSocketServiceHost host;
|
|
|
|
if (_hosts.TryGetValue (path, out host)) {
|
|
|
|
if (_hosts.TryGetValue (path, out host))
|
|
|
|
_logger.Error (
|
|
|
|
throw new ArgumentException ("Already in use.", "path");
|
|
|
|
"A WebSocket service with the specified path has already existed."
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
host = new WebSocketServiceHost<TBehavior> (path, initializer, _logger);
|
|
|
|
host = new WebSocketServiceHost<TBehavior> (path, initializer, _logger);
|
|
|
|
|
|
|
|
|
|
|
|
if (!_clean)
|
|
|
|
if (!_clean)
|
|
|
|
host.KeepClean = false;
|
|
|
|
host.KeepClean = false;
|
|
|
|
|
|
|
|
|
|
|
|
|