mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
fix(streaming): cancel timed-out future before retrying in _put
Prevents accumulation of pending Queue.put coroutines in the event loop when the producer retries after a timeout. Each timed-out future is now cancelled before the next attempt.
This commit is contained in:
parent
fca395f8ed
commit
a44de6ba9b
1 changed files with 1 additions and 0 deletions
|
|
@ -109,6 +109,7 @@ class _SyncIteratorToQueue:
|
|||
fut.result(timeout=0.5)
|
||||
return
|
||||
except TimeoutError:
|
||||
fut.cancel()
|
||||
continue
|
||||
except Exception:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue