Skip to content

Commit

Permalink
#88577 do not count on auth error
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Jan 27, 2020
1 parent 31e32b8 commit 29f6ab0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vs/platform/userDataSync/common/userDataAutoSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ export class UserDataAutoSync extends Disposable implements IUserDataAutoSyncSer
await this.userDataSyncService.sync();
this.successiveFailures = 0;
} catch (e) {
this.successiveFailures++;
// Do not count on auth errors
if (!(e instanceof UserDataSyncError && e.code === UserDataSyncErrorCode.Unauthroized)) {
this.successiveFailures++;
}
this.logService.error(e);
this._onError.fire(e instanceof UserDataSyncError ? { code: e.code, source: e.source } : { code: UserDataSyncErrorCode.Unknown });
}
Expand Down

0 comments on commit 29f6ab0

Please sign in to comment.