fix: electron backend not starting

This commit is contained in:
LukeGus
2026-05-22 16:16:14 -05:00
parent 3bb305bc38
commit 4c2a317f24
6 changed files with 24 additions and 17 deletions
+5 -1
View File
@@ -423,6 +423,7 @@ app.commandLine.appendSwitch("--enable-features=NetworkService");
let mainWindow = null;
let backendProcess = null;
let backendStartFailed = false;
let tray = null;
let isQuitting = false;
@@ -657,6 +658,9 @@ function startBackendServer() {
backendProcess.on("exit", (code, signal) => {
logToFile(`Backend process exited with code ${code}, signal ${signal}`);
if (!resolved && code !== 0) {
backendStartFailed = true;
}
backendProcess = null;
if (!resolved) {
resolved = true;
@@ -1092,7 +1096,7 @@ ipcMain.handle("get-platform", () => {
ipcMain.handle("get-embedded-server-status", () => {
return {
running: backendProcess !== null && !backendProcess.killed,
running: backendProcess !== null && !backendProcess.killed && !backendStartFailed,
embedded: !isDev,
dataDir: isDev ? null : getBackendDataDir(),
};