fix(desktop): restore windows daemon bootstrap logging

This commit is contained in:
Mohamed Boudra
2026-03-28 00:25:23 +07:00
parent 394b9cac13
commit 7bc1f04e27
2 changed files with 27 additions and 12 deletions
+16 -1
View File
@@ -1162,6 +1162,9 @@ export class HostRuntimeStore {
} }
private async bootstrapDesktop(): Promise<void> { private async bootstrapDesktop(): Promise<void> {
let lastError: unknown = null;
for (let attempt = 1; attempt <= 3; attempt += 1) {
try { try {
const daemon = await startDesktopDaemon(); const daemon = await startDesktopDaemon();
const connection = connectionFromListen(daemon.listen); const connection = connectionFromListen(daemon.listen);
@@ -1173,8 +1176,20 @@ export class HostRuntimeStore {
label: daemon.hostname ?? undefined, label: daemon.hostname ?? undefined,
connection, connection,
}); });
return;
} catch (error) { } catch (error) {
console.warn("[HostRuntime] Failed to bootstrap desktop daemon", error); lastError = error;
console.warn(`[HostRuntime] Failed to bootstrap desktop daemon (attempt ${attempt}/3)`, error);
if (attempt < 3) {
await new Promise((resolve) => {
setTimeout(resolve, attempt * 500);
});
}
}
}
if (lastError) {
console.warn("[HostRuntime] Desktop daemon bootstrap exhausted retries", lastError);
} }
} }
+1 -1
View File
@@ -1,5 +1,5 @@
import log from "electron-log/main"; import log from "electron-log/main";
log.initialize(); log.initialize({ spyRendererConsole: true });
import path from "node:path"; import path from "node:path";
import { pathToFileURL } from "node:url"; import { pathToFileURL } from "node:url";