From 6823476285a846efc96147c1e727987da7939e1f Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 31 Oct 2026 05:27:48 +0100 Subject: main: drop stopping state clone --- src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5e936dd..d282158 100644 --- a/src/main.rs +++ b/src/main.rs @@ -262,7 +262,6 @@ async fn main() -> Result<()> { }); let server_fut = server_builder.into_future(); - let stopping = state.clone(); tokio::pin!(server_fut); // Joins, then runs until stopped; returns only if joining fails. @@ -314,9 +313,9 @@ async fn main() -> Result<()> { info!("Stopped while joining the swarm"); return Ok(()); } - swarm::peer::farewell(&stopping).await; - swarm::state_file::update(&stopping, true).await; - swarm::document_file::flush(&stopping).await; + swarm::peer::farewell(&state).await; + swarm::state_file::update(&state, true).await; + swarm::document_file::flush(&state).await; Ok(()) } -- cgit v1.3.1