diff --git a/aquatic_udp/src/lib/glommio/handlers.rs b/aquatic_udp/src/lib/glommio/handlers.rs index 397faf3..acb2ff5 100644 --- a/aquatic_udp/src/lib/glommio/handlers.rs +++ b/aquatic_udp/src/lib/glommio/handlers.rs @@ -40,18 +40,17 @@ pub async fn run_request_worker( })); for (_, receiver) in request_receivers.streams() { - handle_request_stream( - &config, + spawn_local(handle_request_stream( + config.clone(), torrents.clone(), response_senders.clone(), receiver, - ) - .await; + )).await; } } async fn handle_request_stream( - config: &Config, + config: Config, torrents: Rc>, response_senders: Rc>, mut stream: S,