mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
avoid hanging up on websocket apps after initial set of commands have completed
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user