提交 5d0a9392 编写于 作者: S Sandeep Somavarapu

skip syncing if sync is in progress

上级 991215af
...@@ -114,6 +114,10 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ ...@@ -114,6 +114,10 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ
async sync(): Promise<void> { async sync(): Promise<void> {
await this.checkEnablement(); await this.checkEnablement();
if (this.status === SyncStatus.Syncing) {
this.logService.info(`Skipped synchronizing as sync is in progress.`);
return;
}
await this.syncThrottler.queue(() => this.doSync()); await this.syncThrottler.queue(() => this.doSync());
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册