Bug 1297974 - correctly handle shutdown exceptions while applying incoming records. r?rnewman draft
authorMark Hammond <mhammond@skippinet.com.au>
Mon, 22 Aug 2016 14:36:29 +1000
changeset 405280 da42cb84344b893bf7334ecd8c98818c4d53c2db
parent 405279 e6941194c9e07d197aacf4290cb25fc5ae6aa33d
child 529410 072eb470561d3e63210b7826e25c5b3fce0814ad
push id27458
push userbmo:markh@mozilla.com
push dateThu, 25 Aug 2016 07:46:24 +0000
reviewersrnewman
bugs1297974
milestone51.0a1
Bug 1297974 - correctly handle shutdown exceptions while applying incoming records. r?rnewman MozReview-Commit-ID: 7vgaD1yLdb4
services/sync/modules/engines.js
--- a/services/sync/modules/engines.js
+++ b/services/sync/modules/engines.js
@@ -1089,16 +1089,19 @@ SyncEngine.prototype = {
               return;
             case SyncEngine.kRecoveryStrategy.ignore:
               self._log.debug("Ignoring record " + item.id +
                               " with bad HMAC: already handled.");
               return;
           }
         }
       } catch (ex) {
+        if (Async.isShutdownException(ex)) {
+          throw ex;
+        }
         self._log.warn("Error decrypting record", ex);
         self._noteApplyFailure();
         failed.push(item.id);
         return;
       }
 
       let shouldApply;
       try {