You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): cancel non-streaming action runs on client disconnect #125
The non-streaming branch of the web handlers (genkit_fastapi/_handler.py, genkit_flask/_handler.py, genkit_django/_handler.py) awaits action.run(...) to completion even after the HTTP client disconnects.
In JS Express, response.on('close') aborts the non-streaming run.
Follow-up from #51 (which handles the streaming StoppableStream / to_sse path): wire client-disconnect cancellation into the non-streaming run() branch across FastAPI, Flask, and Django.
Addressed directly in PR #51 (7c3ffb0): FastAPI now cancels non-streaming action_obj.run(...) via request.is_disconnected(), and Django ASGI's native ASGIHandler cancellation is covered by a test (Flask is WSGI and has no pre-response disconnect channel).
Activity
huangjeff5 commentedon Nov 13, 2026
Addressed directly in PR #51 (7c3ffb0): FastAPI now cancels non-streaming
action_obj.run(...)viarequest.is_disconnected(), and Django ASGI's nativeASGIHandlercancellation is covered by a test (Flask is WSGI and has no pre-response disconnect channel).