From c362ea792c42d6c084251d2918a7cca75a9ef317 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 27 Aug 2024 16:12:20 +0200 Subject: Also retry on DEADLINE_EXCEEDED ... as those typically are of transient nature as well. --- src/buildtool/common/remote/retry.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/buildtool/common/remote/retry.cpp') diff --git a/src/buildtool/common/remote/retry.cpp b/src/buildtool/common/remote/retry.cpp index 785cfa65..00d275cd 100644 --- a/src/buildtool/common/remote/retry.cpp +++ b/src/buildtool/common/remote/retry.cpp @@ -72,7 +72,9 @@ auto WithRetry(CallableReturningGrpcStatus const& f, for (auto attempt = 1U; attempt <= attempts; ++attempt) { status = f(); if (status.ok() or - status.error_code() != grpc::StatusCode::UNAVAILABLE) { + ((status.error_code() != grpc::StatusCode::UNAVAILABLE) and + (status.error_code() != + grpc::StatusCode::DEADLINE_EXCEEDED))) { return {status.ok(), std::move(status)}; } // don't wait if it was the last attempt -- cgit v1.2.3