From e8a0795bd8bfe0c8e0ab390fdc0947de14a39922 Mon Sep 17 00:00:00 2001 From: Andy Gayton Date: Thu, 30 May 2024 21:31:05 -0400 Subject: [PATCH] wip: cont on http interface --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index a055efa..97d0c00 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,10 @@ async fn main() -> Result<(), Box> { let args = Args::parse(); let store = Store::spawn(args.path); if let Some(addr) = args.http { - let _ = xs::http::serve(store.clone(), &addr).await; + let store = store.clone(); + tokio::spawn(async move { + let _ = xs::http::serve(store, &addr).await; + }); } xs::api::serve(store).await // TODO: graceful shutdown