make sure to flush underlying stream

This commit is contained in:
Simon Cruanes 2024-03-25 10:18:27 -04:00
parent bbebf15fce
commit fca8ba46e1
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -12,7 +12,8 @@ let encode_deflate_writer_ ~buf_size (w : W.t) : W.t =
let oc' = Iostream_camlzip.compressed_out ~buf_size ~level:4 oc in let oc' = Iostream_camlzip.compressed_out ~buf_size ~level:4 oc in
write (oc' :> IO.Output.t); write (oc' :> IO.Output.t);
IO.Output.flush oc'; IO.Output.flush oc';
IO.Output.close oc' IO.Output.close oc';
IO.Output.flush oc
in in
IO.Writer.make ~write:write' () IO.Writer.make ~write:write' ()