MITM Warning

This commit is contained in:
decolua
2026-05-16 11:39:39 +07:00
parent 18f87f43ca
commit b5979dfbd6
37 changed files with 137 additions and 64 deletions
+7 -2
View File
@@ -698,6 +698,9 @@ function startServer(latestVersion) {
// old NSStatusItem released before a new tray process can register;
// otherwise the bgProcess tray silently fails ("works sometimes").
try { await require("./src/cli/tray/tray").killTray(); } catch (e) { }
// Extra delay so macOS NSStatusBar fully removes the old icon before
// bgProcess spawns a new one. Without this, two icons appear briefly.
await new Promise((r) => setTimeout(r, 400));
// Enable auto startup on OS boot
try {
@@ -731,8 +734,10 @@ function startServer(latestVersion) {
console.log(` • Open Dashboard`);
console.log(` • Quit\n`);
// Exit current process - background process takes over
cleanup();
// Exit current process - background process takes over.
// Don't call cleanup() here: tray already killed above, and cleanup()
// would kill the server which bgProcess relies on staying alive.
isShuttingDown = true;
process.exit(0);
} else if (choice === "exit") {
isShuttingDown = true;