[Modify] Polish it
This commit is contained in:
parent
c0815b2781
commit
204fd79dfc
@ -271,17 +271,13 @@ namespace WebSocketSharp.Net
|
|||||||
if (uriPrefix == null)
|
if (uriPrefix == null)
|
||||||
throw new ArgumentNullException ("uriPrefix");
|
throw new ArgumentNullException ("uriPrefix");
|
||||||
|
|
||||||
var ret = _prefixes.Remove (uriPrefix);
|
if (!_prefixes.Contains (uriPrefix))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!ret)
|
if (_listener.IsListening)
|
||||||
return ret;
|
EndPointManager.RemovePrefix (uriPrefix, _listener);
|
||||||
|
|
||||||
if (!_listener.IsListening)
|
return _prefixes.Remove (uriPrefix);
|
||||||
return ret;
|
|
||||||
|
|
||||||
EndPointManager.RemovePrefix (uriPrefix, _listener);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
Reference in New Issue
Block a user