mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
Add comment to task spawner middleware
This commit is contained in:
parent
ac42e0bfff
commit
5a178ba393
1 changed files with 4 additions and 0 deletions
|
|
@ -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<B: Send + 'static>(
|
||||
req: axum::http::Request<B>,
|
||||
next: axum::middleware::Next<B>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue