mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
Fix/replace application issue (#692)
* fix scenario where ws replace application from gather while awaiting command and no tasks on execution stack * lint * remove some debug logging
This commit is contained in:
@@ -1447,6 +1447,11 @@ Duration=${duration} `
|
||||
this.currentTask.kill(this, KillReason.Replaced);
|
||||
this.currentTask = null;
|
||||
}
|
||||
else if (this.wakeupResolver) {
|
||||
this.logger.debug('CallSession:replaceApplication - waking up');
|
||||
this.wakeupResolver({reason: 'new tasks'});
|
||||
this.wakeupResolver = null;
|
||||
}
|
||||
}
|
||||
|
||||
kill(onBackgroundGatherBargein = false) {
|
||||
@@ -1471,7 +1476,8 @@ Duration=${duration} `
|
||||
this.logger.info('CallSession:kill - found bargein disabled in the stack, clearing to that point');
|
||||
break;
|
||||
}
|
||||
this.tasks.shift();
|
||||
const rem = this.tasks.shift();
|
||||
this.logger.debug(`CallSession:kill - clearing task ${rem.summary}`);
|
||||
}
|
||||
}
|
||||
else this.tasks = [];
|
||||
|
||||
Reference in New Issue
Block a user