[Modify] Replace it

master
sta 5 years ago
parent f3a7f1259d
commit 0212b93558

@ -138,8 +138,10 @@ namespace WebSocketSharp.Net
/// </exception> /// </exception>
public void Add (string uriPrefix) public void Add (string uriPrefix)
{ {
if (_listener.IsDisposed)
throw new ObjectDisposedException (_listener.GetType ().ToString ());
HttpListenerPrefix.CheckPrefix (uriPrefix); HttpListenerPrefix.CheckPrefix (uriPrefix);
_listener.CheckDisposed ();
if (_prefixes.Contains (uriPrefix)) if (_prefixes.Contains (uriPrefix))
return; return;

Loading…
Cancel
Save