mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-17 20:32:25 +03:00
Root cause: ServerSupervisor.handleExit()'s give-up branch only printed the crash summary/log via console.error(). In --tray/--tray-worker mode this process is launched detached with stdio:"ignore" on Windows and Linux (bin/cli/tray/detachedTray.mjs buildTrayLaunch()), so that output is discarded by the OS and nothing ever explained why the tray + gateway disappeared together. Fix (Part A only, see plan-file for Part B — a restart-on-failure policy, out of scope here): best-effort append the crash summary + buffered log to <DATA_DIR>/server/crash.log, wrapped in try/catch so the write can never block shutdown. Surface the same file from `omniroute doctor`. Regression test: tests/unit/issue-13538-tray-crash-diagnostics-lost.test.ts