From bb10e3a1c39ce49553393f6a25f41df768b2b5a6 Mon Sep 17 00:00:00 2001 From: Simo Lin Date: Sat, 16 Aug 2025 22:36:45 -0700 Subject: [PATCH] [router] fix pd prefill http request complinace issue (#9237) --- sgl-router/src/routers/pd_router.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sgl-router/src/routers/pd_router.rs b/sgl-router/src/routers/pd_router.rs index 1d0dd3a60..79589ef5d 100644 --- a/sgl-router/src/routers/pd_router.rs +++ b/sgl-router/src/routers/pd_router.rs @@ -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; } });