diff --git a/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts b/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts index 1cae7582e56..3cf12e871af 100644 --- a/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts +++ b/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts @@ -204,8 +204,8 @@ export class UserDataAutoSyncService extends Disposable implements IUserDataAuto await this.userDataSyncService.resetLocal(); } } catch (error) { + this.logService.error(error); if (softTurnOffOnError) { - this.logService.error(error); this.updateEnablement(false); } else { throw error; diff --git a/src/vs/platform/userDataSync/common/userDataSyncService.ts b/src/vs/platform/userDataSync/common/userDataSyncService.ts index 49b22b246ad..828b37cef34 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncService.ts @@ -391,16 +391,14 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ async resetLocal(): Promise { this.checkEnablement(); this.storageService.remove(LAST_SYNC_TIME_KEY, StorageScope.APPLICATION); - if (this.activeProfileSynchronizers) { - for (const [synchronizer] of this.activeProfileSynchronizers.values()) { - try { - await synchronizer.resetLocal(); - } catch (e) { - this.logService.error(e); - } + for (const [synchronizer] of this.activeProfileSynchronizers.values()) { + try { + await synchronizer.resetLocal(); + } catch (e) { + this.logService.error(e); } - this.clearActiveProfileSynchronizers(); } + this.clearActiveProfileSynchronizers(); this._onDidResetLocal.fire(); this.logService.info('Did reset the local sync state.'); }