Stop smooth streaming immediately on abort

This commit is contained in:
Cohee 2025-01-31 13:38:23 +00:00
parent ae376b4195
commit 9710d88a88

View File

@ -3365,7 +3365,7 @@ class StreamingProcessor {
const timestamps = [];
for await (const { text, swipes, logprobs, toolCalls, state } of this.generator()) {
timestamps.push(Date.now());
if (this.isStopped) {
if (this.isStopped || this.abortController.signal.aborted) {
return;
}