diff --git a/Cargo.toml b/Cargo.toml index e4db50f..fced60b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bdflib" -version = "0.3.1" +version = "0.3.2" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/src/io.rs b/src/io.rs index 3381b5f..1a75d9b 100644 --- a/src/io.rs +++ b/src/io.rs @@ -59,7 +59,7 @@ impl ThreadManager { self.sender_work = None; } - /// Waits for the waitgroup + /// Waits for the wait group pub fn wait(&mut self) { let wg = self.wg.clone(); self.wg = WaitGroup::new(); @@ -181,6 +181,7 @@ impl BDFWriter { /// Flushes the buffered chunk data and the writer /// to finish the file. pub fn finish(&mut self) -> Result<(), Error> { + self.flush()?; self.thread_manager.drop_sender(); self.thread_manager.wait(); self.flush()?;