Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Vpn.Service/Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ await _tunnelSupervisor.StartAsync(_config.TunnelBinaryPath, HandleTunnelRpcMess
if (reply.MsgCase != TunnelMessage.MsgOneofCase.Start)
throw new InvalidOperationException("Tunnel did not reply with a Start response");

// If the tunnel failed to start, stop the subprocess.
if (!reply.Start.Success)
await _tunnelSupervisor.StopAsync(ct);

await BroadcastStatus(reply.Start.Success ? TunnelStatus.Started : TunnelStatus.Stopped, ct);
return reply.Start;
}
Expand Down
Loading