From 66bb466297c7104cf6ec6be16168ca9e7a8e24b2 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Thu, 7 Aug 2025 16:01:45 -0400 Subject: [PATCH] fix bug where task.kill is not passed cs (#1315) --- lib/tasks/listen.js | 2 +- lib/utils/background-task-manager.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/listen.js b/lib/tasks/listen.js index d5b16c79..3f6f5fa9 100644 --- a/lib/tasks/listen.js +++ b/lib/tasks/listen.js @@ -72,7 +72,7 @@ class TaskListen extends Task { } catch (err) { this.logger.info(err, `TaskListen:exec - error ${this.url}`); } - if (this.transcribeTask) this.transcribeTask.kill(); + if (this.transcribeTask) this.transcribeTask.kill(cs); this._removeListeners(ep); } diff --git a/lib/utils/background-task-manager.js b/lib/utils/background-task-manager.js index 3a427c10..7c55b80e 100644 --- a/lib/utils/background-task-manager.js +++ b/lib/utils/background-task-manager.js @@ -65,7 +65,7 @@ class BackgroundTaskManager extends Emitter { this.logger.info(`stopping background task: ${type}`); task.removeAllListeners(); task.span.end(); - task.kill(); + task.kill(this.cs); // Remove task from managed List this.tasks.delete(type); }