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 { ...@@ -886,12 +886,9 @@ impl PDRouter {
tokio::spawn(async move { tokio::spawn(async move {
if let Ok(response) = prefill_future.await { if let Ok(response) = prefill_future.await {
// Consume at most one small chunk with a very short timeout to advance flow control // Consume the entire response body to maintain HTTP compliance
let _ = tokio::time::timeout(Duration::from_millis(20), async { // This runs in the background and won't block the decode response
let mut s = response.bytes_stream(); let _ = response.bytes().await;
let _ = s.next().await;
})
.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