[Modify] Lock it
This commit is contained in:
parent
3447e69286
commit
9bf82164e0
@ -800,17 +800,20 @@ namespace WebSocketSharp.Net
|
||||
if (!_listening)
|
||||
return;
|
||||
|
||||
_listening = false;
|
||||
lock (_contextRegistrySync) {
|
||||
if (!_listening)
|
||||
return;
|
||||
|
||||
EndPointManager.RemoveListener (this);
|
||||
EndPointManager.RemoveListener (this);
|
||||
|
||||
lock (_contextRegistrySync)
|
||||
cleanupContextQueue (true);
|
||||
cleanupContextRegistry ();
|
||||
|
||||
cleanupContextRegistry ();
|
||||
var ex = new HttpListenerException (995, "The listener is stopped.");
|
||||
cleanupWaitQueue (ex);
|
||||
|
||||
var ex = new HttpListenerException (995, "The listener is stopped.");
|
||||
cleanupWaitQueue (ex);
|
||||
_listening = false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user