diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-27 16:12:20 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-27 17:48:36 +0200 |
commit | c362ea792c42d6c084251d2918a7cca75a9ef317 (patch) | |
tree | 01ac0598f1b55ca873bc7a640bd62e4c31ec6bf3 | |
parent | 1a2fee922d0c2d9b9c37188ab326adeaf347cfc5 (diff) | |
download | justbuild-c362ea792c42d6c084251d2918a7cca75a9ef317.tar.gz |
Also retry on DEADLINE_EXCEEDED
... as those typically are of transient nature as well.
-rw-r--r-- | src/buildtool/common/remote/retry.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 |