mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-25 16:21:50 +00:00
fix(http_handler.py): add retry logic for httpx.ConnectError
This commit is contained in:
@@ -98,7 +98,7 @@ class AsyncHTTPHandler:
|
||||
response = await self.client.send(req, stream=stream)
|
||||
response.raise_for_status()
|
||||
return response
|
||||
except httpx.RemoteProtocolError:
|
||||
except (httpx.RemoteProtocolError, httpx.ConnectError):
|
||||
# Retry the request with a new session if there is a connection error
|
||||
new_client = self.create_client(timeout=self.timeout, concurrent_limit=1)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user