diff --git a/src/main_sync.c b/src/main_sync.c index 88baae2..24a88c9 100644 --- a/src/main_sync.c +++ b/src/main_sync.c @@ -43,9 +43,11 @@ print_stats( void ) static void stats_timeout( void *aux ATTR_UNUSED ) { - stats_steps = -1; + if (stats_steps != -1) { + stats_steps = -1; + print_stats(); + } conf_wakeup( &stats_wakeup, 200 ); - print_stats(); } void @@ -55,8 +57,10 @@ stats( void ) return; // If the main loop appears to be running, skip the sync path. - if (stats_steps < 0) + if (stats_steps < 0) { + stats_steps = -2; return; + } // Rate-limit the (somewhat) expensive timer queries. if (++stats_steps < 10)