forked from phoenix/litellm-mirror
fix(http_handler.py): add retry logic for httpx.ConnectError
This commit is contained in:
parent
831745e710
commit
8571cb45e8
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue