Merge pull request #74 from lowlyocean/fix_sse_timeout

fix: SSE fails after default timeout of 5 minutes
This commit is contained in:
Tim Jaeryang Baek
2025-04-13 22:00:20 -07:00
committed by GitHub

View File

@@ -98,7 +98,7 @@ async def lifespan(app: FastAPI):
await create_dynamic_endpoints(app, api_dependency=api_dependency)
yield
if server_type == "sse":
async with sse_client(url=args[0]) as (reader, writer):
async with sse_client(url=args[0], sse_read_timeout=None) as (reader, writer):
async with ClientSession(reader, writer) as session:
app.state.session = session
await create_dynamic_endpoints(app, api_dependency=api_dependency)