From e7bc0b0737229e47f2f366830dc8ec2c798cc461 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Sun, 5 May 2024 19:12:29 +0700 Subject: [PATCH] fix dead lock in say verb while waiting playback-stop and say verb is killed (#742) --- lib/tasks/say.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tasks/say.js b/lib/tasks/say.js index 47d39e79..2dd9b3bb 100644 --- a/lib/tasks/say.js +++ b/lib/tasks/say.js @@ -364,6 +364,8 @@ class TaskSay extends TtsTask { } this.ep.removeAllListeners('playback-start'); this.ep.removeAllListeners('playback-stop'); + // if we are waiting for playback-stop event, resolve the promise + if (this._playResolve) this._playResolve(); } }