Plugin: do not drop syncs requested during a sync

Was annoying to not get changes synced when writing something quickly while the server is waking up
This commit is contained in:
Val Packett 2023-10-17 22:32:29 -03:00
parent 98f9bece17
commit e7e36fe244

View file

@ -1191,10 +1191,15 @@ Formatted with `deno fmt`.
this.afterSyncOnceHook();
delete this.afterSyncOnceHook;
}
if (this.wantResync) {
this.wantResync = false;
this.backgroundSync();
}
}
sync(all) {
if (this.isSyncing) {
this.wantResync = true;
return;
}
this.isSyncing = true;