flowworker: flush local work queue on capture timeout

Capture timeout means no packets have been received for some
time, so this is a good time to flush out all work.
pull/8858/head
Victor Julien 2 years ago
parent 55e32b2544
commit d333dffdcb

@ -485,7 +485,7 @@ static inline void FlowWorkerProcessInjectedFlows(
static inline void FlowWorkerProcessLocalFlows(ThreadVars *tv, FlowWorkerThreadData *fw, Packet *p)
{
uint32_t max_work = 2;
if (p->pkt_src == PKT_SRC_SHUTDOWN_FLUSH)
if (p->pkt_src == PKT_SRC_SHUTDOWN_FLUSH || p->pkt_src == PKT_SRC_CAPTURE_TIMEOUT)
max_work = 0;
FLOWWORKER_PROFILING_START(p, PROFILE_FLOWWORKER_FLOW_EVICTED);

Loading…
Cancel
Save