diff --git a/src/main.rs b/src/main.rs index ddfc8e18..25fa6ff0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -274,6 +274,10 @@ async fn run_server() -> io::Result<()> { Ok(()) } +/// Ensures the request runs in a new tokio thread. +/// +/// The axum request handler task gets cancelled if the connection is shut down; +/// by spawning our own task, processing continue after the client disconnects. async fn spawn_task( req: axum::http::Request, next: axum::middleware::Next,