Update litellm/proxy/common_request_processing.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
harish-berri 2026-05-04 17:40:30 -07:00 committed by GitHub
parent d2c0585f7c
commit b8128efd1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -560,8 +560,7 @@ async def _check_request_disconnection(
start_time = time.time()
while time.time() - start_time < DEFAULT_CLIENT_DISCONNECT_CHECK_TIMEOUT_SECONDS:
await asyncio.sleep(1)
message = await request.receive()
if message.get("type") == "http.disconnect":
if await request.is_disconnected():
# cancel the LLM API Call task if any passed - this is passed from individual providers
# Example OpenAI, Azure, VertexAI etc
llm_api_call_task.cancel()