From 9710d88a88a7cd02ad68cdcdc1cc857d2db154f0 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 31 Jan 2025 13:38:23 +0000 Subject: [PATCH] Stop smooth streaming immediately on abort --- public/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index c4416f117..e25b9e4ef 100644 --- a/public/script.js +++ b/public/script.js @@ -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; }