diff --git a/litellm/litellm_core_utils/streaming_handler.py b/litellm/litellm_core_utils/streaming_handler.py index d2ab43fdfaf..fcfecf7c438 100644 --- a/litellm/litellm_core_utils/streaming_handler.py +++ b/litellm/litellm_core_utils/streaming_handler.py @@ -109,6 +109,7 @@ class _SyncIteratorToQueue: fut.result(timeout=0.5) return except TimeoutError: + fut.cancel() continue except Exception: return