瀏覽代碼

fud: flush sled on exit

epiphany 1 年之前
父節點
當前提交
386f3907c2
共有 1 個文件被更改,包括 5 次插入1 次删除
  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(())
 }