Unverified Commit bb10e3a1 authored by Simo Lin's avatar Simo Lin Committed by GitHub
Browse files

[router] fix pd prefill http request complinace issue (#9237)

parent fda762a2
......@@ -886,12 +886,9 @@ impl PDRouter {
tokio::spawn(async move {
if let Ok(response) = prefill_future.await {
// Consume at most one small chunk with a very short timeout to advance flow control
let _ = tokio::time::timeout(Duration::from_millis(20), async {
let mut s = response.bytes_stream();
let _ = s.next().await;
})
.await;
// Consume the entire response body to maintain HTTP compliance
// This runs in the background and won't block the decode response
let _ = response.bytes().await;
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment