[Modify] Polish it
This commit is contained in:
parent
412070f47f
commit
41dd8b89d1
@ -134,12 +134,17 @@ namespace WebSocketSharp.Net
|
|||||||
public void Add (string uriPrefix)
|
public void Add (string uriPrefix)
|
||||||
{
|
{
|
||||||
_listener.CheckDisposed ();
|
_listener.CheckDisposed ();
|
||||||
|
|
||||||
HttpListenerPrefix.CheckPrefix (uriPrefix);
|
HttpListenerPrefix.CheckPrefix (uriPrefix);
|
||||||
|
|
||||||
if (_prefixes.Contains (uriPrefix))
|
if (_prefixes.Contains (uriPrefix))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_prefixes.Add (uriPrefix);
|
_prefixes.Add (uriPrefix);
|
||||||
if (_listener.IsListening)
|
|
||||||
|
if (!_listener.IsListening)
|
||||||
|
return;
|
||||||
|
|
||||||
EndPointManager.AddPrefix (uriPrefix, _listener);
|
EndPointManager.AddPrefix (uriPrefix, _listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user