diff options
Diffstat (limited to 'src')
| -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(()) } |
