Fix FullOnly updater fallback
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user