mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
config: fixes from bargein testing
This commit is contained in:
@@ -254,7 +254,7 @@ class CallSession extends Emitter {
|
||||
this.backgroundGatherTask && this.backgroundGatherTask.removeAllListeners();
|
||||
this.backgroundGatherTask && this.backgroundGatherTask.span.end();
|
||||
this.backgroundGatherTask = null;
|
||||
if (autoEnable && !this.callGone) {
|
||||
if (autoEnable && !this.callGone && !this._stopping) {
|
||||
this.logger.info('CallSession:enableBotMode: restarting background gather');
|
||||
setImmediate(() => this.enableBotMode(gather, true));
|
||||
}
|
||||
@@ -274,7 +274,7 @@ class CallSession extends Emitter {
|
||||
if (this.backgroundGatherTask) {
|
||||
try {
|
||||
this.backgroundGatherTask.removeAllListeners();
|
||||
this.backgroundGatherTask.kill();
|
||||
this.backgroundGatherTask.kill().catch((err) => {});
|
||||
} catch (err) {}
|
||||
this.backgroundGatherTask = null;
|
||||
}
|
||||
@@ -422,6 +422,8 @@ class CallSession extends Emitter {
|
||||
|
||||
// all done - cleanup
|
||||
this.logger.info('CallSession:exec all tasks complete');
|
||||
this._stopping = true;
|
||||
this.disableBotMode();
|
||||
this._onTasksDone();
|
||||
this._clearResources();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user