Resolve possible update memory leak.,

This commit is contained in:
Patrick FIc
2025-10-21 10:03:40 -07:00
parent 6674f33be9
commit bf1e137c6c
5 changed files with 38 additions and 8 deletions

View File

@@ -1,14 +1,19 @@
import { autoUpdater } from "electron-updater";
import { setReleaseChannel } from "../ipc/ipcMainHandler.user";
let continuousUpdatesTriggered = false;
async function checkForAppUpdatesContinuously(): Promise<void> {
checkForAppUpdates();
setInterval(
() => {
checkForAppUpdatesContinuously();
},
1000 * 60 * 30,
);
if (!continuousUpdatesTriggered) {
continuousUpdatesTriggered = true;
checkForAppUpdates();
setInterval(
() => {
checkForAppUpdates();
},
1000 * 60 * 30,
);
}
}
async function checkForAppUpdates(): Promise<void> {
await setReleaseChannel();