Bug 1317592 - don't try syncing other engines after one fails with a shutdown error. r?rnewman
MozReview-Commit-ID: LZ72JbOtpm4
--- a/services/sync/modules/stages/enginesync.js
+++ b/services/sync/modules/stages/enginesync.js
@@ -324,16 +324,23 @@ EngineSynchronizer.prototype = {
if (e.status == 401) {
// Maybe a 401, cluster update perhaps needed?
// We rely on ErrorHandler observing the sync failure notification to
// schedule another sync and clear node assignment values.
// Here we simply want to muffle the exception and return an
// appropriate value.
return false;
}
+ // Note that policies.js has already logged info about the exception...
+ if (Async.isShutdownException(e)) {
+ // Failure due to a shutdown exception should prevent other engines
+ // trying to start and immediately failing.
+ this._log.info(`${engine.name} was interrupted by shutdown; no other engines will sync`);
+ return false;
+ }
}
return true;
},
_updateEnabledFromMeta: function (meta, numClients, engineManager=this.service.engineManager) {
this._log.info("Updating enabled engines: " +
numClients + " clients.");