diff options
author | Alex Auvolat <alex@adnab.me> | 2021-10-15 11:05:09 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-10-19 23:38:42 +0200 |
commit | 65070f3c05775f6692f4a16b6a304991d0510301 (patch) | |
tree | aad55f988f3d29e3643e4141af6c53e79fd89257 /src/garage/server.rs | |
parent | e6da0dc90098a7c830e14f6f0dce61e8e7132d3a (diff) | |
download | garage-65070f3c05775f6692f4a16b6a304991d0510301.tar.gz garage-65070f3c05775f6692f4a16b6a304991d0510301.zip |
Improvements to CLI and various fixes for netapp version
Diffstat (limited to 'src/garage/server.rs')
-rw-r--r-- | src/garage/server.rs | 8 |
1 files changed, 7 insertions, 1 deletions
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..."); |