Fix tray health detection and harden backend service startup
All checks were successful
CI / test (push) Successful in 7s

This commit is contained in:
Space-Banane
2026-05-28 13:44:31 +02:00
parent 114ddd80d6
commit 880bfb1c70
4 changed files with 209 additions and 44 deletions

View File

@@ -63,8 +63,12 @@ internal sealed class BackendProcessService : BackgroundService
try
{
await _backendProcess.WaitForExitAsync(stoppingToken);
LogStdOut($"Backend process exited with code {_backendProcess.ExitCode}.");
_logger.LogWarning("Backend process exited with code {ExitCode}.", _backendProcess.ExitCode);
var exitCode = _backendProcess.ExitCode;
LogStdErr($"Backend process exited unexpectedly with code {exitCode}.");
_logger.LogError("Backend process exited unexpectedly with code {ExitCode}.", exitCode);
Environment.ExitCode = exitCode == 0 ? 1 : exitCode;
throw new InvalidOperationException(
$"Backend process ended unexpectedly. Service host exit code: {Environment.ExitCode}.");
}
catch (OperationCanceledException)
{