Bug 1621308 - Give up client sync early during shutdown r=glasserc

A significant amount of clients report OFFLINE_ERROR during shutdown.

Instead of adding a new uptake status to be reported when detecting offline during shutdown (eg. INTERRUPTED, not *_ERROR), we do nothing and give up immediately.

Differential Revision: https://phabricator.services.mozilla.com/D66271

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mathieu Leplatre 2020-03-10 19:10:18 +00:00
parent 02dfadf8c9
commit 9296f12f2b

View File

@ -426,6 +426,14 @@ class RemoteSettingsClient extends EventEmitter {
console.warn(`${this.identifier} sync already running`);
return;
}
// Prevent network requests and IndexedDB calls to be initiated
// during shutdown.
if (Services.startup.shuttingDown) {
console.warn(`${this.identifier} sync interrputed by shutdown`);
return;
}
this._syncRunning = true;
let importedFromDump = [];