Skip to content

Commit f54a79c

Browse files
authored
fix: Flush outputStream after write (#22660)
transfer() method should call flush() on the OutputStream before returning to ensure all buffered data is actually written
1 parent b707c9e commit f54a79c

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)