diff --git a/src/stats.c b/src/stats.c index 590b2bf2..15f94361 100644 --- a/src/stats.c +++ b/src/stats.c @@ -461,7 +461,8 @@ static void *_stats_thread(void *arg) thread_mutex_unlock(&_global_event_mutex); } - thread_sleep(300000); + if(global_event_queue == NULL) /* Only sleep if no events are pending */ + thread_sleep(300000); } /* wake the other threads so they can shut down cleanly */