mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
reset broadcasted version if failed to broadcast
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
ee4d414853
commit
b727564ac0
@ -54,12 +54,11 @@ export function startUpdateChecking(interval = 1000 * 60 * 60 * 24): void {
|
||||
* didn't ask for.
|
||||
*/
|
||||
autoUpdater.autoInstallOnAppQuit = false;
|
||||
installVersion = args.version;
|
||||
|
||||
try {
|
||||
const backchannel = `auto-update:${args.version}`;
|
||||
|
||||
installVersion = args.version;
|
||||
|
||||
ipcMain.removeAllListeners(backchannel); // only one handler should be present
|
||||
|
||||
// make sure that the handler is in place before broadcasting (prevent race-condition)
|
||||
@ -73,6 +72,7 @@ export function startUpdateChecking(interval = 1000 * 60 * 60 * 24): void {
|
||||
broadcastMessage(UpdateAvailableChannel, backchannel, args);
|
||||
} catch (error) {
|
||||
logger.error(`${AutoUpdateLogPrefix}: broadcasting failed`, { error });
|
||||
installVersion = undefined;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user