Skip to content

cancel prefill on client disconnect#111

Open
n30g30 wants to merge 1 commit into
antirez:mainfrom
n30g30:fix/prefill-client-disconnect
Open

cancel prefill on client disconnect#111
n30g30 wants to merge 1 commit into
antirez:mainfrom
n30g30:fix/prefill-client-disconnect

Conversation

@n30g30
Copy link
Copy Markdown

@n30g30 n30g30 commented May 13, 2026

problem: ds4-server only notices client disconnects after prompt prefill finishes, because prefill performs no socket writes. Long-context requests can therefore keep running for minutes after the client has cancelled.

solution: Check the client socket from the prefill progress callback and cancel the active session when the connection is gone. ds4_session_sync() now observes that cancellation between prefill chunks and returns early.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants