www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 37c3d8fc25bf67918355bc082becdfc0f92a01f2
parent e7cea2ebc8cf65ddf5414a2630d913fdbd1b75fc
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon,  7 Jul 2008 15:56:24 +0000

Don't throw an error if a sync is already going on when an auto-sync fires



Diffstat:
Mchrome/content/zotero/xpcom/sync.js | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js @@ -1039,8 +1039,13 @@ Zotero.Sync.Server = new function () { } // {} implements nsITimerCallback - _autoSyncTimer.initWithCallback({ notify: Zotero.Sync.Server.sync }, - autoSyncTimeout * 1000, Components.interfaces.nsITimer.TYPE_ONE_SHOT); + _autoSyncTimer.initWithCallback({ notify: function () { + if (_syncInProgress) { + Zotero.debug('Sync already in progress -- skipping auto-sync'); + return; + } + Zotero.Sync.Server.sync(); + }}, autoSyncTimeout * 1000, Components.interfaces.nsITimer.TYPE_ONE_SHOT); }