fix #916: race condition where call just ended when action hook play completes (#917)

This commit is contained in:
Dave Horton
2024-09-25 20:17:22 -04:00
committed by GitHub
parent 7f7c26e982
commit 7c24208067

View File

@@ -134,7 +134,9 @@ class ActionHookDelayProcessor extends Emitter {
this.logger.debug({evt}, 'got playback-start'); this.logger.debug({evt}, 'got playback-start');
if (!this._active) { if (!this._active) {
this.logger.info({evt}, 'ActionHookDelayProcessor#_onNoResponseTimer: killing audio immediately'); this.logger.info({evt}, 'ActionHookDelayProcessor#_onNoResponseTimer: killing audio immediately');
this.ep.api('uuid_break', this.ep.uuid)
/* note: in race condition we may have just hung up and cs.ep cleared */
this.ep?.api('uuid_break', this.ep?.uuid)
.catch((err) => this.logger.info(err, .catch((err) => this.logger.info(err,
'ActionHookDelayProcessor#_onNoResponseTimer Error killing audio')); 'ActionHookDelayProcessor#_onNoResponseTimer Error killing audio'));
} }