From 673ca5833ef78d1bc11027349b1c826b25392008 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Thu, 12 Nov 2015 10:54:55 +1100 Subject: [PATCH] Bug 1197625 - delay sync on wake for 5 seconds in the hope the network is back up by then. r=rnewman --- services/sync/modules/policies.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/sync/modules/policies.js b/services/sync/modules/policies.js index b4de2ee98f5..eb42f8d0edd 100644 --- a/services/sync/modules/policies.js +++ b/services/sync/modules/policies.js @@ -272,10 +272,11 @@ SyncScheduler.prototype = { case "wake_notification": this._log.debug("Woke from sleep."); Utils.nextTick(() => { - // Trigger a sync if we have multiple clients. + // Trigger a sync if we have multiple clients. We give it 5 seconds + // incase the network is still in the process of coming back up. if (this.numClients > 1) { - this._log.debug("More than 1 client. Syncing."); - this.scheduleNextSync(0); + this._log.debug("More than 1 client. Will sync in 5s."); + this.scheduleNextSync(5000); } }); break;