From 0da83b05cf1972385b457b824ebfa3eef85329b0 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 18 Sep 2024 12:21:42 +0200 Subject: [PATCH] threads: use sleeping threads for minimum time a bit longer If a thread doesn't receive packets for a while the packet timestamp will no longer be used to determine a reasonable minimum timestamp for flow timeout handling. To avoid issues with the minimum timestamp to be set a bit too aggressively, increase the time a thread can be inactive. --- src/tm-threads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tm-threads.c b/src/tm-threads.c index 11199bc130..380a6a17a7 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -2272,7 +2272,7 @@ void TmThreadsGetMinimalTimestamp(struct timeval *ts) if (t->type != TVT_PPT) continue; if (SCTIME_CMP_NEQ(t->pktts, nullts)) { - SCTime_t sys_sec_stamp = SCTIME_ADD_SECS(t->sys_sec_stamp, 1); + SCTime_t sys_sec_stamp = SCTIME_ADD_SECS(t->sys_sec_stamp, 5); /* ignore sleeping threads */ if (SCTIME_CMP_LT(sys_sec_stamp, now)) continue;