Skip to content

Commit

Permalink
[7.2.1] Retry on connection reset error for http cache. (#22785)
Browse files Browse the repository at this point in the history
Previously, it only retries when we have error whose message contains
"connection reset by peer". In some cases, we could also have message
like "Connection reset", e.g.
https://buildkite.com/bazel/bazel-bazel-macos-ninja/builds/1827#01902690-f35a-4f3d-9166-7b39c1f885fb.

PiperOrigin-RevId: 644325070
Change-Id: I75500646b35681fda25e584ec5d6ec3348cee9a5
  • Loading branch information
coeuvre authored Jun 18, 2024
1 parent 62a5662 commit 55b48d2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private static boolean shouldEnableRemoteDownloader(RemoteOptions options) {
|| status == HttpResponseStatus.GATEWAY_TIMEOUT.code();
} else if (e instanceof IOException) {
String msg = Ascii.toLowerCase(e.getMessage());
if (msg.contains("connection reset by peer")) {
if (msg.contains("connection reset")) {
retry = true;
} else if (msg.contains("operation timed out")) {
retry = true;
Expand Down

0 comments on commit 55b48d2

Please sign in to comment.