diff --git a/pageserver/src/virtual_file/owned_buffers_io/write/flush.rs b/pageserver/src/virtual_file/owned_buffers_io/write/flush.rs index 7c5c10b918..e77603a7ba 100644 --- a/pageserver/src/virtual_file/owned_buffers_io/write/flush.rs +++ b/pageserver/src/virtual_file/owned_buffers_io/write/flush.rs @@ -175,6 +175,13 @@ where Ok((recycled, flush_control)) } + async fn handle_error(&mut self) -> std::io::Result { + Err(self + .shutdown() + .await + .expect_err("flush task only disconnects duplex if it exits with an error")) + } + /// Cleans up the channel, join the flush task. pub async fn shutdown(&mut self) -> std::io::Result> { let handle = self @@ -192,10 +199,6 @@ where .as_mut() .expect("must not use after we returned an error") } - - async fn handle_error(&mut self) -> std::io::Result { - Err(self.shutdown().await.expect_err("flush task only disconnects duplex if it exits with an error")) - } } /// A background task for flushing data to disk.