mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
address greptile review feedback (greploop iteration 3)
Close httpx streaming response on error to prevent connection pool exhaustion
This commit is contained in:
parent
5d52247353
commit
758f83642f
1 changed files with 2 additions and 1 deletions
|
|
@ -410,8 +410,8 @@ async def _async_streaming(
|
|||
litellm_logging_obj: "LiteLLMLoggingObj",
|
||||
provider_config: "BasePassthroughConfig",
|
||||
):
|
||||
iter_response = await response
|
||||
try:
|
||||
iter_response = await response
|
||||
iter_response.raise_for_status()
|
||||
raw_bytes: List[bytes] = []
|
||||
|
||||
|
|
@ -427,4 +427,5 @@ async def _async_streaming(
|
|||
)
|
||||
)
|
||||
except Exception:
|
||||
await iter_response.aclose()
|
||||
raise
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue