on rest outdial failure, if remote end closed gracefully don't wait for a reconnection

This commit is contained in:
Dave Horton committed 2023-08-01 12:51:43 -04:00
1 parent d2f4777d10
commit 78337ad55e
1 file changed
+5 -1
+5 -1
View File
@@ -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;