From 1b450c4b493dfcb2ee88acbca3ea584beac8eb4b Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 15 Oct 2021 11:05:09 +0200 Subject: Improvements to CLI and various fixes for netapp version Discovery via consul, persist peer list to file --- src/garage/server.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/garage/server.rs') diff --git a/src/garage/server.rs b/src/garage/server.rs index 0edf3e2d..cd92d157 100644 --- a/src/garage/server.rs +++ b/src/garage/server.rs @@ -71,8 +71,14 @@ pub async fn run_server(config_file: PathBuf) -> Result<(), Error> { // Remove RPC handlers for system to break reference cycles garage.system.netapp.drop_all_handlers(); - // Await for last parts to end + // Await for netapp RPC system to end run_system.await?; + + // Break last reference cycles so that stuff can terminate properly + garage.break_reference_cycles(); + drop(garage); + + // Await for all background tasks to end await_background_done.await?; info!("Cleaning up..."); -- cgit v1.2.3