Fix FullOnly updater fallback
This commit is contained in:
parent
1fc6a26299
commit
e1a12d2b99
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue