Thread was killed by the generic TmThreadKillThreads instead of
the FlowKillFlowRecyclerThread. The latter wakes the thread up, so
that shutdown is quite a bit faster.
TmThreadsSetFlag(tv, THV_KILL);
TmThreadsSetFlag(tv, THV_DEINIT);
+ SCCtrlCondSignal(&flow_recycler_ctrl_cond);
+
/* be sure it has shut down */
while (!TmThreadsCheckFlag(tv, THV_CLOSED)) {
usleep(100);
BUG_ON(global_de_ctx == NULL);
}
+ /* before TmThreadKillThreads, as otherwise that kills it
+ * but more slowly */
+ if (suri.run_mode != RUNMODE_UNIX_SOCKET) {
+ FlowKillFlowRecyclerThread();
+ }
+
TmThreadKillThreads();
if (suri.run_mode != RUNMODE_UNIX_SOCKET) {
SCPerfReleaseResources();
- FlowKillFlowRecyclerThread();
FlowShutdown();
StreamTcpFreeConfig(STREAM_VERBOSE);
}