Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions turbine/src/quic_endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,21 @@ async fn send_datagram_task(
connection: Connection,
mut receiver: AsyncReceiver<Bytes>,
) -> Result<(), Error> {
while let Some(bytes) = receiver.recv().await {
connection.send_datagram(bytes)?;
tokio::pin! {
let connection_closed = connection.closed();
}
loop {
tokio::select! {
biased;
bytes = receiver.recv() => {
match bytes {
None => return Ok(()),
Some(bytes) => connection.send_datagram(bytes)?,
}
}
err = &mut connection_closed => return Err(Error::from(err)),
}
}
Ok(())
}

async fn make_connection_task(
Expand Down