diff --git a/crates/ptth_server/src/lib.rs b/crates/ptth_server/src/lib.rs index bb5e852..e3982c6 100644 --- a/crates/ptth_server/src/lib.rs +++ b/crates/ptth_server/src/lib.rs @@ -194,7 +194,6 @@ pub async fn run_server ( }; use arc_swap::ArcSwap; - use http::status::StatusCode; let asset_root = asset_root.unwrap_or_else (PathBuf::new); @@ -238,6 +237,15 @@ pub async fn run_server ( client, }); + run_server_loop (state, shutdown_oneshot).await +} + +async fn run_server_loop ( + state: Arc , + shutdown_oneshot: oneshot::Receiver <()>, +) -> Result <(), ServerError> { + use http::status::StatusCode; + let mut backoff_delay = 0; let mut shutdown_oneshot = shutdown_oneshot.fuse ();