Update chat_controller.py

This commit is contained in:
Sun Tao 2025-11-21 00:38:34 +08:00
parent 973fc385fd
commit 1b00270a23

View file

@ -58,6 +58,7 @@ async def timeout_stream_wrapper(stream_generator, timeout_seconds: int = SSE_TI
yield data
except asyncio.TimeoutError:
chat_logger.warning(f"SSE timeout: No data received for {timeout_seconds} seconds, closing connection")
# yield sse_json("error", {"message": "Connection timeout: No data received for 10 minutes"})
# TODO: Temporary change: suppress error signal to frontend on timeout. Needs proper fix later.
break
except StopAsyncIteration: