Skip to content

Commit 1852be0

Browse files
committed
flush
1 parent 9a0efa0 commit 1852be0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/google/devtools/build/lib/query2/query/output/StreamedProtoOutputFormatter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ private static byte[] writeDelimited(Build.Target targetProtoBuffer) {
8383
var serializedSize = targetProtoBuffer.getSerializedSize();
8484
var headerSize = CodedOutputStream.computeUInt32SizeNoTag(serializedSize);
8585
var output = new byte[headerSize + serializedSize];
86-
targetProtoBuffer.writeTo(CodedOutputStream.newInstance(output, headerSize, output.length - headerSize));
86+
var codedOut = CodedOutputStream.newInstance(output, headerSize, output.length - headerSize);
87+
targetProtoBuffer.writeTo(codedOut);
88+
codedOut.flush();
8789
return output;
8890
} catch (IOException e) {
8991
throw new WrappedIOException(e);

0 commit comments

Comments
 (0)