Skip to content

[GUI] Health check polling doesn't detect daemon crash #62

@Vantalens

Description

@Vantalens

File: packages/gui/src-tauri/src/lib.rs:72

Severity: Medium

Description:
Daemon crashes immediately after spawn; loop sleeps 10 seconds (40 × 250ms) checking port that will never open instead of detecting early exit via child.try_wait().

Code:

for _ in 0..40 {
    std::thread::sleep(Duration::from_millis(250));
    if is_daemon_healthy(config.port) {
        return Ok(...);
    }
}

Failure Scenario:

  • Spawn daemon with invalid config (missing provider, bad port, etc.)
  • Daemon crashes within 100ms
  • Health check loops for full 10 seconds checking dead port
  • User waits unnecessarily; slow startup experience

Suggested Fix:
Check child.try_wait() each iteration; if process exited, fail immediately with stderr output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingguiGUI/frontend related issuesmedium-priorityMedium priority issuesrustRust code related issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions