fix(protocol): increase per-stream flow control windows and remove adaptive read caps

This commit is contained in:
2026-03-17 22:46:55 +00:00
parent 0b8420aac9
commit 124df129ec
5 changed files with 38 additions and 74 deletions

View File

@@ -862,11 +862,7 @@ async fn handle_client_connection(
log::warn!("Stream {} upload: window still 0 after stall timeout, closing", stream_id);
break;
}
// Adaptive: cap read to current per-stream target window
let adaptive_cap = remoteingress_protocol::compute_window_for_stream_count(
active_streams.load(Ordering::Relaxed),
) as usize;
let max_read = w.min(32768).min(adaptive_cap);
let max_read = w.min(32768);
tokio::select! {
read_result = client_read.read(&mut buf[FRAME_HEADER_SIZE..FRAME_HEADER_SIZE + max_read]) => {

View File

@@ -487,11 +487,7 @@ async fn handle_hub_frame(
log::warn!("Stream {} download: window still 0 after stall timeout, closing", stream_id);
break;
}
// Adaptive: cap read to current per-stream target window
let adaptive_cap = remoteingress_protocol::compute_window_for_stream_count(
stream_counter.load(Ordering::Relaxed),
) as usize;
let max_read = w.min(32768).min(adaptive_cap);
let max_read = w.min(32768);
tokio::select! {
read_result = up_read.read(&mut buf[FRAME_HEADER_SIZE..FRAME_HEADER_SIZE + max_read]) => {