[Modify] Polish it

This commit is contained in:
sta 2017-03-08 16:46:23 +09:00
parent 0e9da7ac58
commit 681fa65c0d

View File

@ -282,7 +282,7 @@ namespace WebSocketSharp.Server
#region Internal Methods #region Internal Methods
internal void Add<TBehavior> (string path, Func<TBehavior> initializer) internal void Add<TBehavior> (string path, Func<TBehavior> creator)
where TBehavior : WebSocketBehavior where TBehavior : WebSocketBehavior
{ {
path = HttpUtility.UrlDecode (path).TrimSlashFromEnd (); path = HttpUtility.UrlDecode (path).TrimSlashFromEnd ();
@ -292,7 +292,9 @@ namespace WebSocketSharp.Server
if (_hosts.TryGetValue (path, out host)) if (_hosts.TryGetValue (path, out host))
throw new ArgumentException ("Already in use.", "path"); throw new ArgumentException ("Already in use.", "path");
host = new WebSocketServiceHost<TBehavior> (path, initializer, _logger); host = new WebSocketServiceHost<TBehavior> (
path, creator, null, _logger
);
if (!_clean) if (!_clean)
host.KeepClean = false; host.KeepClean = false;