mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-21 15:56:10 +08:00
Fix accounts syncing in a hard loop due to redis loopback
This commit is contained in:
parent
13a723e663
commit
ac3f96e2d4
|
@ -73,11 +73,14 @@ class SyncWorker {
|
|||
}
|
||||
|
||||
_onAccountUpdated() {
|
||||
if (!this.isWaitingForNextSync()) {
|
||||
const syncingNow = !this.isWaitingForNextSync()
|
||||
const syncingJustFinished = (Date.now() - this._lastSyncTime < 5000);
|
||||
|
||||
if (syncingNow || syncingJustFinished) {
|
||||
return;
|
||||
}
|
||||
this._getAccount()
|
||||
.then((account) => {
|
||||
|
||||
this._getAccount().then((account) => {
|
||||
this._account = account;
|
||||
this.syncNow({reason: 'Account Modification'});
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue