Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd7f4ac8

Browse files
authored
fix: stop vpn binary on startup failure (#150)
The vpn binary doesn't exit by itself on failure to avoid messing up RPC calls, so the parent process is expected to stop it.
1 parentefb60ca commitd7f4ac8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎Vpn.Service/Manager.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ await _tunnelSupervisor.StartAsync(_config.TunnelBinaryPath, HandleTunnelRpcMess
172172
if(reply.MsgCase!=TunnelMessage.MsgOneofCase.Start)
173173
thrownewInvalidOperationException("Tunnel did not reply with a Start response");
174174

175+
// If the tunnel failed to start, stop the subprocess.
176+
if(!reply.Start.Success)
177+
await_tunnelSupervisor.StopAsync(ct);
178+
175179
awaitBroadcastStatus(reply.Start.Success?TunnelStatus.Started:TunnelStatus.Stopped,ct);
176180
returnreply.Start;
177181
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp