From f6d1f63d53914b78d5e1197b82ed7f4869b4b5bf Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Thu, 21 May 2026 22:37:25 -0400 Subject: [PATCH] BrokerServer should not retry on 401. --- .gitignore | 3 ++- src/Runner.Common/BrokerServer.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 411fe4011a5..a7a57dc42bd 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ TestResults TestLogs .DS_Store .mono -**/*.DotSettings.user \ No newline at end of file +**/*.DotSettings.user +**/*.lscache \ No newline at end of file diff --git a/src/Runner.Common/BrokerServer.cs b/src/Runner.Common/BrokerServer.cs index 751ae1eee32..c642b4af1cf 100644 --- a/src/Runner.Common/BrokerServer.cs +++ b/src/Runner.Common/BrokerServer.cs @@ -108,7 +108,7 @@ public Task ForceRefreshConnection(VssCredentials credentials) public bool ShouldRetryException(Exception ex) { - if (ex is AccessDeniedException || ex is RunnerNotFoundException || ex is HostedRunnerDeprovisionedException) + if (ex is AccessDeniedException || ex is VssUnauthorizedException || ex is RunnerNotFoundException || ex is HostedRunnerDeprovisionedException) { return false; }