aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
index dbfea08cd8..c8d6fb69d8 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
@@ -184,11 +184,6 @@ class RemoteSpawnRunner implements SpawnRunner {
return execLocallyOrFail(spawn, policy, inputMap, actionKey, uploadLocalResults, e);
}
- boolean executionFailed = result.getExitCode() != 0;
- if (options.remoteLocalFallback && executionFailed) {
- return execLocally(spawn, policy, inputMap, uploadLocalResults, remoteCache, actionKey);
- }
-
try {
return downloadRemoteResults(result, policy.getFileOutErr());
} catch (IOException e) {
@@ -216,7 +211,7 @@ class RemoteSpawnRunner implements SpawnRunner {
boolean uploadLocalResults,
IOException cause)
throws ExecException, InterruptedException, IOException {
- if (options.remoteLocalFallback) {
+ if (options.remoteLocalFallback && !(cause instanceof TimeoutException)) {
return execLocally(spawn, policy, inputMap, uploadLocalResults, remoteCache, actionKey);
}
return handleError(cause, policy.getFileOutErr());