diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts index 22948e23dc06672f81d027bdcb166641c4cca1a8..be36b10cd485cdf103daa424f7c1d4aacbd3c18f 100644 --- a/apps/desktop/src/main.ts +++ b/apps/desktop/src/main.ts @@ -641,7 +641,7 @@ async function downloadAvailableUpdate(): Promise { } function installDownloadedUpdate(): void { - if (!updaterConfigured || updateState.status !== "downloaded") return; + if (isQuitting || !updaterConfigured || updateState.status !== "downloaded") return; isQuitting = true; clearUpdatePollTimer(); @@ -1030,6 +1030,7 @@ function registerIpcHandlers(): void { ipcMain.removeHandler(UPDATE_INSTALL_CHANNEL); ipcMain.handle(UPDATE_INSTALL_CHANNEL, async () => { + if (isQuitting) return; installDownloadedUpdate(); }); }