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

This commit is contained in:
Dave Horton
2023-08-01 12:51:43 -04:00
parent d2f4777d10
commit 78337ad55e

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;