diff --git a/src/Runner.Common/RunServer.cs b/src/Runner.Common/RunServer.cs index 19b389a32..b57d2754b 100644 --- a/src/Runner.Common/RunServer.cs +++ b/src/Runner.Common/RunServer.cs @@ -94,7 +94,9 @@ namespace GitHub.Runner.Common { CheckConnection(); return RetryRequest( - async () => await _runServiceHttpClient.RenewJobAsync(requestUri, planId, jobId, cancellationToken), cancellationToken); + async () => await _runServiceHttpClient.RenewJobAsync(requestUri, planId, jobId, cancellationToken), cancellationToken, + shouldRetry: ex => + ex is not TaskOrchestrationJobNotFoundException); // HTTP status 404 } } }