diff options
| author | tv <tv@krebsco.de> | 2026-10-31 05:27:48 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-31 05:27:48 +0100 |
| commit | 8802997e3adfe43b2e084f3695f8620fdfc36759 (patch) | |
| tree | aeac1f2101e1acb5d87e1b01555f70bbc1982159 /src/main.rs | |
| parent | 08d2da02cfb305bbe4b965340db48129e22f60f4 (diff) | |
main: drop stopping state clone
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files 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(()) } |
