Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

v1.16: Remove a unnecessary sleep in run server (backport of #32216) #32251

Merged
merged 1 commit into from
Jun 26, 2023
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
7 changes: 1 addition & 6 deletions streamer/src/nonblocking/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ use {
},
time::{Duration, Instant},
},
tokio::{
task::JoinHandle,
time::{sleep, timeout},
},
tokio::{task::JoinHandle, time::timeout},
};

const WAIT_FOR_STREAM_TIMEOUT: Duration = Duration::from_millis(100);
Expand Down Expand Up @@ -135,7 +132,6 @@ async fn run_server(
coalesce: Duration,
) {
const WAIT_FOR_CONNECTION_TIMEOUT: Duration = Duration::from_secs(1);
const WAIT_BETWEEN_NEW_CONNECTIONS: Duration = Duration::from_millis(1);
debug!("spawn quic server");
let mut last_datapoint = Instant::now();
let unstaked_connection_table: Arc<Mutex<ConnectionTable>> = Arc::new(Mutex::new(
Expand Down Expand Up @@ -173,7 +169,6 @@ async fn run_server(
stats.clone(),
wait_for_chunk_timeout,
));
sleep(WAIT_BETWEEN_NEW_CONNECTIONS).await;
} else {
debug!("accept(): Timed out waiting for connection");
}
Expand Down