Skip to content

Commit bee5e69

Browse files
committed
avoid buffering - next ISeq chunk may be delayed
1 parent cca9a7b commit bee5e69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ring-core-protocols/src/ring/core/protocols.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
(write-body-to-stream [body response output-stream]
5656
(with-open [writer (response-writer response output-stream)]
5757
(doseq [chunk body]
58-
(.write writer (str chunk)))))
58+
(.write writer (str chunk))
59+
(.flush writer))))
5960
java.io.InputStream
6061
(write-body-to-stream [body _ ^OutputStream output-stream]
6162
(with-open [body body]

0 commit comments

Comments
 (0)