From 64b31120a59f949f64a0a4dc6174b74f478f4c51 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Thu, 24 Feb 2022 14:16:14 -0500 Subject: [PATCH] bugfix to prev commit --- lib/session/call-session.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/session/call-session.js b/lib/session/call-session.js index 584b1aac..b7b2e814 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -313,14 +313,14 @@ class CallSession extends Emitter { this.logger.error(err, `Error executing task #${stackNum}:${taskNum}: ${task.name}`); break; } + } - if (0 === this.tasks.length && this.hasStableDialog && this.requestor instanceof WsRequestor) { - try { - await this._awaitCommandsOrHangup(); - } catch (err) { - this.logger.info(err, 'CallSession:exec - error waiting for new commands'); - break; - } + if (0 === this.tasks.length && this.hasStableDialog && this.requestor instanceof WsRequestor) { + try { + await this._awaitCommandsOrHangup(); + } catch (err) { + this.logger.info(err, 'CallSession:exec - error waiting for new commands'); + break; } } }