mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 1707020 - Exit Background Update Task even if we never get a progress update r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D114029
This commit is contained in:
parent
06ddcdaaad
commit
80d788222c
@ -127,8 +127,8 @@ async function _attemptBackgroundUpdate() {
|
||||
UpdateService.onlyDownloadUpdatesThisSession = true;
|
||||
} else if (
|
||||
status == AppUpdater.STATUS.DOWNLOADING &&
|
||||
progress !== undefined &&
|
||||
progressMax !== undefined
|
||||
(UpdateService.onlyDownloadUpdatesThisSession ||
|
||||
(progress !== undefined && progressMax !== undefined))
|
||||
) {
|
||||
// We get a DOWNLOADING callback with no progress or progressMax values
|
||||
// when we initially switch to the DOWNLOADING state. But when we get
|
||||
@ -137,9 +137,9 @@ async function _attemptBackgroundUpdate() {
|
||||
// we can count on being meaningful, but it will be set to -1 for BITS
|
||||
// transfers that haven't begun yet.
|
||||
if (
|
||||
UpdateService.onlyDownloadUpdatesThisSession ||
|
||||
progressMax < 0 ||
|
||||
progress != progressMax ||
|
||||
UpdateService.onlyDownloadUpdatesThisSession
|
||||
progress != progressMax
|
||||
) {
|
||||
log.debug(
|
||||
`${SLUG}: Download in progress. Exiting task while download ` +
|
||||
|
Loading…
Reference in New Issue
Block a user