Fix FullOnly updater fallback

This commit is contained in:
Fedor Indutny 2024-02-23 10:54:29 -08:00 committed by GitHub
parent 1fc6a26299
commit e1a12d2b99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -109,7 +109,9 @@ export abstract class Updater {
protected readonly getMainWindow: () => BrowserWindow | undefined;
private throttledSendDownloadingUpdate: (downloadedSize: number) => void;
private throttledSendDownloadingUpdate: ((downloadedSize: number) => void) & {
cancel: () => void;
};
private activeDownload: Promise<boolean> | undefined;
@ -135,7 +137,7 @@ export abstract class Updater {
DialogType.Downloading,
{ downloadedSize }
);
}, 500);
}, 50);
}
//
@ -381,7 +383,7 @@ export abstract class Updater {
this.logger.warn(
'offerUpdate: Failed to download differential update, offering full'
);
this.throttledSendDownloadingUpdate.cancel();
return this.offerUpdate(updateInfo, DownloadMode.FullOnly, attempt + 1);
}