Merge branch 'main' of github.com:jambonz/jambonz-feature-server into feature/cognigy-enhancements-alex

This commit is contained in:
akirilyuk
2022-02-03 17:04:02 +01:00
9 changed files with 85 additions and 59 deletions

View File

@@ -179,6 +179,7 @@ class TaskDial extends Task {
this._killOutdials();
if (this.sd) {
this.sd.kill();
this.sd.removeAllListeners();
this.sd = null;
}
if (this.callSid) sessionTracker.remove(this.callSid);

View File

@@ -62,7 +62,9 @@ class Task extends Emitter {
kill(cs) {
if (this.cs && !this.cs.isConfirmCallSession) this.logger.debug(`${this.name} is being killed`);
this._killInProgress = true;
// no-op
/* remove reference to parent task or else entangled parent-child tasks will not be gc'ed */
setImmediate(() => this.parentTask = null);
}
/**