Explorar o código

fud: flush sled on exit

epiphany hai 1 ano
pai
achega
386f3907c2
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      bin/fud/fud/src/main.rs

+ 5 - 1
bin/fud/fud/src/main.rs

@@ -291,6 +291,10 @@ async fn realmain(args: Args, ex: Arc<Executor<'static>>) -> Result<()> {
     dht_disconnect_task.stop().await;
     announce_task.stop().await;
 
-    info!("Bye!");
+    info!(target: "fud", "Flushing sled database...");
+    let flushed_bytes = sled_db.flush_async().await?;
+    info!(target: "fud", "Flushed {} bytes", flushed_bytes);
+
+    info!(target: "fud", "Shut down successfully");
     Ok(())
 }