Resolve possible update memory leak.,
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user