[Modify] Polish it
This commit is contained in:
parent
5faef22008
commit
1ebf72c957
@ -455,19 +455,23 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
private void close (bool force)
|
private void close (bool force)
|
||||||
{
|
{
|
||||||
if (_listening) {
|
if (!_listening) {
|
||||||
_listening = false;
|
_disposed = true;
|
||||||
|
|
||||||
cleanupContextQueue (force);
|
return;
|
||||||
cleanupContextRegistry ();
|
|
||||||
|
|
||||||
var name = GetType ().ToString ();
|
|
||||||
var ex = new ObjectDisposedException (name);
|
|
||||||
cleanupWaitQueue (ex);
|
|
||||||
|
|
||||||
EndPointManager.RemoveListener (this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_listening = false;
|
||||||
|
|
||||||
|
cleanupContextQueue (force);
|
||||||
|
cleanupContextRegistry ();
|
||||||
|
|
||||||
|
var name = GetType ().ToString ();
|
||||||
|
var ex = new ObjectDisposedException (name);
|
||||||
|
cleanupWaitQueue (ex);
|
||||||
|
|
||||||
|
EndPointManager.RemoveListener (this);
|
||||||
|
|
||||||
_disposed = true;
|
_disposed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user