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

This commit is contained in:
Dan Stillman 2008-07-07 15:56:24 +00:00
parent e7cea2ebc8
commit 37c3d8fc25

View file

@ -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);
}