diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnStrategy.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnStrategy.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnStrategy.java b/src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnStrategy.java index f6f3dc9391..ea8b6c5beb 100644 --- a/src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnStrategy.java @@ -295,6 +295,8 @@ public final class WorkerSpawnStrategy implements SandboxedSpawnActionContext { RecordingInputStream recordingStream = new RecordingInputStream(worker.getInputStream()); recordingStream.startRecording(4096); try { + // response can be null when the worker has already closed stdout at this point and thus the + // InputStream is at EOF. response = WorkResponse.parseDelimitedFrom(recordingStream); } catch (InvalidProtocolBufferException e) { // If protobuf couldn't parse the response, try to print whatever the failing worker wrote |