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

View file

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