From 78337ad55e343106c28a450447e01bb573d14a86 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Tue, 1 Aug 2023 12:51:43 -0400 Subject: [PATCH] on rest outdial failure, if remote end closed gracefully don't wait for a reconnection --- lib/session/call-session.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/session/call-session.js b/lib/session/call-session.js index 14c6b1d5..745a8606 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -796,7 +796,11 @@ class CallSession extends Emitter { } } - if (0 === this.tasks.length && this.requestor instanceof WsRequestor && !this.callGone) { + if (0 === this.tasks.length && + this.requestor instanceof WsRequestor && + !this.requestor.this.closedGracefully && + !this.callGone + ) { try { await this._awaitCommandsOrHangup(); if (this.callGone) break;