Skip to content

Commit 9c1b688

Browse files
committed
SocketBridgeService: Fix state transition error
1 parent ee1f86a commit 9c1b688

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ElectronNET.API/Runtime/Services/SocketBridge/SocketBridgeService.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ protected override Task StopCore()
4040
private void Connect()
4141
{
4242
this.socket.Connect();
43-
this.TransitionState(LifetimeState.Started);
43+
if (this.State < LifetimeState.Started)
44+
{
45+
this.TransitionState(LifetimeState.Started);
46+
}
4447
}
4548

4649
private void Socket_BridgeDisconnected(object sender, EventArgs e)

0 commit comments

Comments
 (0)