[Modify] Lock it

This commit is contained in:
sta 2021-04-20 19:35:07 +09:00
parent 5f73b1bfe3
commit 3447e69286

View File

@ -772,6 +772,12 @@ namespace WebSocketSharp.Net
{ {
CheckDisposed (); CheckDisposed ();
if (_listening)
return;
lock (_contextRegistrySync) {
CheckDisposed ();
if (_listening) if (_listening)
return; return;
@ -779,6 +785,7 @@ namespace WebSocketSharp.Net
_listening = true; _listening = true;
} }
}
/// <summary> /// <summary>
/// Stops receiving incoming requests. /// Stops receiving incoming requests.