From c3627cecb87539d0fbcba8bc8bf234761aa16baa Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Tue, 10 Jan 2023 08:22:53 -0500 Subject: [PATCH] avoid hanging up on websocket apps after initial set of commands have completed --- lib/session/call-session.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/session/call-session.js b/lib/session/call-session.js index 9f23dd2c..f86bf3e7 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -667,7 +667,7 @@ class CallSession extends Emitter { } } - if (0 === this.tasks.length && this.hasStableDialog && this.requestor instanceof WsRequestor) { + if (0 === this.tasks.length && this.requestor instanceof WsRequestor && !this.callGone) { let span; try { const {span} = this.rootSpan.startChildSpan('waiting for commands'); @@ -678,7 +678,7 @@ class CallSession extends Emitter { 'async.request.command': command }); span.end(); - if (!this.hasStableDialog || this.callGone) break; + if (this.callGone) break; } catch (err) { span.end(); this.logger.info(err, 'CallSession:exec - error waiting for new commands');