diff --git a/lib/session/call-session.js b/lib/session/call-session.js index e2a3017d..f927a362 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -782,11 +782,11 @@ class CallSession extends Emitter { } if (0 === this.tasks.length && this.requestor instanceof WsRequestor && !this.callGone) { - let span; + //let span; try { + //const {span} = this.rootSpan.startChildSpan('waiting for commands'); + //const {reason, queue, command} = await this._awaitCommandsOrHangup(); /* - const {span} = this.rootSpan.startChildSpan('waiting for commands'); - const {reason, queue, command} = await this._awaitCommandsOrHangup(); span.setAttributes({ 'completion.reason': reason, 'async.request.queue': queue, @@ -794,9 +794,10 @@ class CallSession extends Emitter { }); span.end(); */ + await this._awaitCommandsOrHangup(); if (this.callGone) break; } catch (err) { - span.end(); + //span.end(); this.logger.info(err, 'CallSession:exec - error waiting for new commands'); break; }