diff --git a/src/suricata.c b/src/suricata.c index cc2a80fef2..be3b5a2fd2 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -1541,12 +1541,6 @@ int main(int argc, char **argv) SCLogInfo("all packets processed by threads, stopping engine"); } - struct timeval end_time; - memset(&end_time, 0, sizeof(end_time)); - gettimeofday(&end_time, NULL); - - SCLogInfo("time elapsed %" PRIuMAX "s", (uintmax_t)(end_time.tv_sec - start_time.tv_sec)); - break; } @@ -1568,6 +1562,11 @@ int main(int argc, char **argv) FlowForceReassembly(); + struct timeval end_time; + memset(&end_time, 0, sizeof(end_time)); + gettimeofday(&end_time, NULL); + SCLogInfo("time elapsed %" PRIuMAX "s", (uintmax_t)(end_time.tv_sec - start_time.tv_sec)); + TmThreadKillThreads(); SCPerfReleaseResources(); FlowShutdown();