Don't throw an error if a sync is already going on when an auto-sync fires
This commit is contained in:
parent
e7cea2ebc8
commit
37c3d8fc25
1 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue