Skip to main content

spawn_http_server

Function spawn_http_server 

Source
pub fn spawn_http_server(runner: Arc<AgentRunner>) -> JoinHandle<()>
Expand description

Start the HTTP server.

The JoinHandle is returned rather than dropped: with_graceful_shutdown only drains in-flight requests if something awaits the task. Without this the runtime is dropped as soon as main returns and connections are cut mid-response.