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
Родитель 02dfadf8c9
Коммит 9296f12f2b
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -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 = [];