[Modify] Move it

This commit is contained in:
sta 2021-04-20 20:20:49 +09:00
parent d7b3fef56d
commit 526fb635c9

View File

@ -813,8 +813,6 @@ namespace WebSocketSharp.Net
if (!_listening) if (!_listening)
return; return;
EndPointManager.RemoveListener (this);
cleanupContextQueue (true); cleanupContextQueue (true);
cleanupContextRegistry (); cleanupContextRegistry ();
@ -822,6 +820,8 @@ namespace WebSocketSharp.Net
var ex = new HttpListenerException (995, msg); var ex = new HttpListenerException (995, msg);
cleanupWaitQueue (ex); cleanupWaitQueue (ex);
EndPointManager.RemoveListener (this);
_listening = false; _listening = false;
} }
} }