mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +00:00
aquatic_udp: glommio: spawn request handlers as tasks
This commit is contained in:
parent
a853a410b1
commit
2cc357f2f2
1 changed files with 4 additions and 5 deletions
|
|
@ -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<S>(
|
||||
config: &Config,
|
||||
config: Config,
|
||||
torrents: Rc<RefCell<TorrentMaps>>,
|
||||
response_senders: Rc<Senders<(AnnounceResponse, SocketAddr)>>,
|
||||
mut stream: S,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue