counters: only print alerts if stats are enabled

(cherry picked from commit a17da8374a)
pull/6344/head
Shivani Bhardwaj 5 years ago committed by Victor Julien
parent 06671e2d5e
commit 2ce308f09f

@ -838,6 +838,9 @@ TmEcode StatsOutputCounterSocket(json_t *cmd,
static void StatsLogSummary(void)
{
if (!stats_enabled) {
return;
}
uint64_t alerts = 0;
SCMutexLock(&stats_table_mutex);
if (stats_table.start_time != 0) {

Loading…
Cancel
Save