mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-19 04:17:44 +00:00
fixed bargin task loop forever (#1253)
This commit is contained in:
@@ -139,7 +139,11 @@ class TaskGather extends SttTask {
|
||||
try {
|
||||
await this.handling(cs, obj);
|
||||
} catch (error) {
|
||||
if (error instanceof SpeechCredentialError) {
|
||||
if (
|
||||
// avoid bargein task with sticky will restart forever
|
||||
// throw exception to stop the loop.
|
||||
!this.sticky &&
|
||||
error instanceof SpeechCredentialError) {
|
||||
this.logger.info('Gather failed due to SpeechCredentialError, finished!');
|
||||
this.notifyTaskDone();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user