[Modify] Polish it

This commit is contained in:
sta 2021-04-26 20:54:17 +09:00
parent 5faef22008
commit 1ebf72c957

View File

@ -455,19 +455,23 @@ namespace WebSocketSharp.Net
private void close (bool force)
{
if (_listening) {
_listening = false;
if (!_listening) {
_disposed = true;
cleanupContextQueue (force);
cleanupContextRegistry ();
var name = GetType ().ToString ();
var ex = new ObjectDisposedException (name);
cleanupWaitQueue (ex);
EndPointManager.RemoveListener (this);
return;
}
_listening = false;
cleanupContextQueue (force);
cleanupContextRegistry ();
var name = GetType ().ToString ();
var ex = new ObjectDisposedException (name);
cleanupWaitQueue (ex);
EndPointManager.RemoveListener (this);
_disposed = true;
}