mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
fix wrong vad notification to background bargin (#781)
* fix wrong vad notification to background bargin * wip * wip * reset bargeinHandled every on reset
This commit is contained in:
@@ -117,6 +117,7 @@ class BackgroundTaskManager extends Emitter {
|
|||||||
this._taskCompleted('bargeIn', task);
|
this._taskCompleted('bargeIn', task);
|
||||||
if (task.sticky && !this.cs.callGone && !this.cs._stopping) {
|
if (task.sticky && !this.cs.callGone && !this.cs._stopping) {
|
||||||
this.logger.info('BackgroundTaskManager:_initBargeIn: restarting background bargeIn');
|
this.logger.info('BackgroundTaskManager:_initBargeIn: restarting background bargeIn');
|
||||||
|
this._bargeInHandled = false;
|
||||||
this.newTask('bargeIn', opts, true);
|
this.newTask('bargeIn', opts, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -186,6 +187,8 @@ class BackgroundTaskManager extends Emitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_bargeInTaskCompleted(evt) {
|
_bargeInTaskCompleted(evt) {
|
||||||
|
if (this._bargeInHandled) return;
|
||||||
|
this._bargeInHandled = true;
|
||||||
this.logger.debug({evt},
|
this.logger.debug({evt},
|
||||||
'BackgroundTaskManager:_bargeInTaskCompleted on event from background bargeIn, emitting bargein-done event');
|
'BackgroundTaskManager:_bargeInTaskCompleted on event from background bargeIn, emitting bargein-done event');
|
||||||
this.emit('bargeIn-done', evt);
|
this.emit('bargeIn-done', evt);
|
||||||
|
|||||||
Reference in New Issue
Block a user