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:
yryzhan 2026-05-20 17:17:03 +02:00
parent fca395f8ed
commit a44de6ba9b

View file

@ -109,6 +109,7 @@ class _SyncIteratorToQueue:
fut.result(timeout=0.5)
return
except TimeoutError:
fut.cancel()
continue
except Exception:
return