[Modify] Replace it

This commit is contained in:
sta 2021-05-08 20:42:51 +09:00
parent 691477b338
commit 8aaef1ef0d

View File

@ -160,8 +160,7 @@ namespace WebSocketSharp.Net
/// </exception> /// </exception>
public void Clear () public void Clear ()
{ {
if (_listener.IsDisposed) _listener.CheckDisposed ();
throw new ObjectDisposedException (_listener.GetType ().ToString ());
if (_listener.IsListening) if (_listener.IsListening)
EndPointManager.RemoveListener (_listener); EndPointManager.RemoveListener (_listener);