Skip to content

Commit 3447e69

Browse files
committed
[Modify] Lock it
1 parent 5f73b1b commit 3447e69

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

websocket-sharp/Net/HttpListener.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,9 +775,16 @@ public void Start ()
775775
if (_listening)
776776
return;
777777

778-
EndPointManager.AddListener (this);
778+
lock (_contextRegistrySync) {
779+
CheckDisposed ();
780+
781+
if (_listening)
782+
return;
783+
784+
EndPointManager.AddListener (this);
779785

780-
_listening = true;
786+
_listening = true;
787+
}
781788
}
782789

783790
/// <summary>

0 commit comments

Comments
 (0)