mirror of
https://github.com/sbt/sbt.git
synced 2026-10-07 18:43:31 +02:00
A task that floods stdout could not be stopped promptly: cancelling it (Ctrl+C from the thin client) stopped the task, but the server kept draining the already-queued output to the client for several seconds, because onCancellationRequest never discarded the pending backlog. onCancellationRequest now sets a per-channel isCanceled flag and clears the queued frames and buffered stdout (discardPending), and jsonRpcNotify drops the cancelled task's systemOut/systemErr while the flag is set, so output stops promptly. Co-authored-by: Claude Fable 5 <[email protected]>
463 B
463 B
Cancelling a task discards its queued output
Previously, cancelling a task that was producing a lot of output (Ctrl+C from the thin client) stopped the task, but the server kept draining the already-queued output to the client for several seconds, so the cancel appeared not to take effect. The cancelled task's buffered stdout/stderr is now discarded on cancel, so output stops promptly. Control-plane messages and the next command's output are unaffected.