diff --git a/src/tmqh-flow.c b/src/tmqh-flow.c index d25fab619e..4fdb4d06ce 100644 --- a/src/tmqh-flow.c +++ b/src/tmqh-flow.c @@ -88,7 +88,7 @@ Packet *TmqhInputFlow(ThreadVars *tv) SCPerfSyncCountersIfSignalled(tv, 0); SCMutexLock(&q->mutex_q); - while (q->len == 0) { + if (q->len == 0) { /* if we have no packets in queue, wait... */ SCCondWait(&q->cond_q, &q->mutex_q); } diff --git a/src/tmqh-simple.c b/src/tmqh-simple.c index cc5b69c068..fe1902be00 100644 --- a/src/tmqh-simple.c +++ b/src/tmqh-simple.c @@ -50,7 +50,7 @@ Packet *TmqhInputSimple(ThreadVars *t) SCMutexLock(&q->mutex_q); - while (q->len == 0) { + if (q->len == 0) { /* if we have no packets in queue, wait... */ SCCondWait(&q->cond_q, &q->mutex_q); } @@ -111,7 +111,7 @@ void TmqhOutputSimple(ThreadVars *t, Packet *p) SCDQGenericQData *TmqhInputSimpleOnQ(SCDQDataQueue *q) { SCMutexLock(&q->mutex_q); - while (q->len == 0) { + if (q->len == 0) { /* if we have no packets in queue, wait... */ SCCondWait(&q->cond_q, &q->mutex_q); }