From bc2bbb426f82f00e446ca274e9f8a926f6f9dbc0 Mon Sep 17 00:00:00 2001 From: Dean Sheather Date: Wed, 23 Jul 2025 14:07:06 +1000 Subject: [PATCH] fix: stop vpn binary on startup failure --- Vpn.Service/Manager.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Vpn.Service/Manager.cs b/Vpn.Service/Manager.cs index fdb62af..027a882 100644 --- a/Vpn.Service/Manager.cs +++ b/Vpn.Service/Manager.cs @@ -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; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy