Skip to content

Commit bd93f19

Browse files
vaadin-botcaalador
andauthored
fix: Flush outputStream after write (#22660) (#22663)
transfer() method should call flush() on the OutputStream before returning to ensure all buffered data is actually written Co-authored-by: caalador <mikael.grankvist@vaadin.com>
1 parent fbd03f8 commit bd93f19

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flow-server/src/main/java/com/vaadin/flow/server/streams/TransferUtil.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public static long transfer(InputStream inputStream,
116116
}
117117
}
118118
}
119+
outputStream.flush();
119120
long finalTransferred = transferred;
120121
listeners.forEach(listener -> listener.onComplete(transferContext,
121122
finalTransferred));

0 commit comments

Comments
 (0)