[Modify] Lock it

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

View File

@ -775,9 +775,16 @@ namespace WebSocketSharp.Net
if (_listening)
return;
EndPointManager.AddListener (this);
lock (_contextRegistrySync) {
CheckDisposed ();
_listening = true;
if (_listening)
return;
EndPointManager.AddListener (this);
_listening = true;
}
}
/// <summary>