mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +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;
|
let span;
|
||||||
try {
|
try {
|
||||||
const {span} = this.rootSpan.startChildSpan('waiting for commands');
|
const {span} = this.rootSpan.startChildSpan('waiting for commands');
|
||||||
@@ -678,7 +678,7 @@ class CallSession extends Emitter {
|
|||||||
'async.request.command': command
|
'async.request.command': command
|
||||||
});
|
});
|
||||||
span.end();
|
span.end();
|
||||||
if (!this.hasStableDialog || this.callGone) break;
|
if (this.callGone) break;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
span.end();
|
span.end();
|
||||||
this.logger.info(err, 'CallSession:exec - error waiting for new commands');
|
this.logger.info(err, 'CallSession:exec - error waiting for new commands');
|
||||||
|
|||||||
Reference in New Issue
Block a user