From 16a786150117d96631aa8b65240388509992721c Mon Sep 17 00:00:00 2001 From: Ada Bohm Date: Mon, 18 Nov 2024 22:26:36 +0100 Subject: [PATCH] Droping writer while pruning --- crates/hyperqueue/src/server/event/journal/stream.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/hyperqueue/src/server/event/journal/stream.rs b/crates/hyperqueue/src/server/event/journal/stream.rs index 220ddb5bf..7ed3924c1 100644 --- a/crates/hyperqueue/src/server/event/journal/stream.rs +++ b/crates/hyperqueue/src/server/event/journal/stream.rs @@ -101,6 +101,7 @@ async fn streaming_process( }, Some(EventStreamMessage::PruneJournal { live_jobs, live_workers, callback }) => { writer.flush()?; + drop(writer); let mut tmp_path: OsString = journal_path.into(); tmp_path.push(".tmp"); let tmp_path: PathBuf = tmp_path.into();