fix: stop untracked CLIProxy installs safely

This commit is contained in:
Tam Nhu Tran
2026-03-07 11:01:35 +07:00
parent a4b626aede
commit ad01196964
3 changed files with 115 additions and 15 deletions
@@ -51,8 +51,8 @@ export async function installDashboardCliproxyVersion(
const backendLabel = backend === 'plus' ? 'CLIProxy Plus' : 'CLIProxy';
const shouldRestoreService = await wasProxyRunning(deps);
// The installer owns the stop-and-replace lifecycle: it stops a running proxy
// and waits for the port to free before swapping the binary.
// The installer owns the stop-and-replace lifecycle, including best-effort
// shutdown for tracked and untracked proxies before swapping the binary.
await deps.installCliproxyVersion(version, true, backend);
if (!shouldRestoreService) {