diff --git a/arrow-ipc/src/writer.rs b/arrow-ipc/src/writer.rs index 9d3fca29387..5fc4027a8f6 100644 --- a/arrow-ipc/src/writer.rs +++ b/arrow-ipc/src/writer.rs @@ -1467,6 +1467,7 @@ impl StreamWriter { } write_continuation(&mut self.writer, &self.write_options, 0)?; + self.writer.flush()?; self.finished = true; @@ -1618,7 +1619,6 @@ fn write_body_buffers( writer.write_all(&PADDING[..pad_len])?; } - writer.flush()?; Ok(total_len) } @@ -1652,8 +1652,6 @@ fn write_continuation( z => panic!("Unsupported crate::MetadataVersion {z:?}"), }; - writer.flush()?; - Ok(written) }