aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index b02af1797..86846b03a 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1978,7 +1978,7 @@ static int handle_speechrecognize(struct ast_channel *chan, AGI *agi, int argc,
switch (speech->state) {
case AST_SPEECH_STATE_READY:
/* If the stream is done, start timeout calculation */
- if ((timeout > 0) && ((!chan->stream) || (chan->streamid == -1 && chan->timingfunc == NULL))) {
+ if ((timeout > 0) && start == 0 && ((!chan->stream) || (chan->streamid == -1 && chan->timingfunc == NULL))) {
ast_stopstream(chan);
time(&start);
}