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.
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:
Failure Scenario:
Suggested Fix:
Check child.try_wait() each iteration; if process exited, fail immediately with stderr output.