move authkey request injection to after app is ready

This commit is contained in:
Evan Simkowitz 2024-08-26 13:20:37 -07:00
parent 48600ddfa4
commit 3777cd1eb0
No known key found for this signature in database

View File

@ -163,7 +163,6 @@ function runWaveSrv(): Promise<boolean> {
applicationVersion: "v" + WaveVersion, applicationVersion: "v" + WaveVersion,
version: (isDev ? "dev-" : "") + String(WaveBuildTime), version: (isDev ? "dev-" : "") + String(WaveBuildTime),
}); });
configureAuthKeyRequestInjection(electron.session.defaultSession);
waveSrvReadyResolve(true); waveSrvReadyResolve(true);
return; return;
} }
@ -867,6 +866,7 @@ async function appMain() {
const ready = await waveSrvReady; const ready = await waveSrvReady;
console.log("wavesrv ready signal received", ready, Date.now() - startTs, "ms"); console.log("wavesrv ready signal received", ready, Date.now() - startTs, "ms");
await electronApp.whenReady(); await electronApp.whenReady();
configureAuthKeyRequestInjection(electron.session.defaultSession);
await relaunchBrowserWindows(); await relaunchBrowserWindows();
await configureAutoUpdater(); await configureAutoUpdater();
setTimeout(runActiveTimer, 5000); // start active timer, wait 5s just to be safe setTimeout(runActiveTimer, 5000); // start active timer, wait 5s just to be safe