1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

stats: dont print periodic stats if path is not running

This commit is contained in:
Steffen Vogel 2017-05-28 19:42:52 +02:00
parent 2ab0b1d52a
commit 31ca905013

View file

@ -24,6 +24,7 @@
* @{
*/
#include "common.h"
#include "hook.h"
#include "plugin.h"
#include "stats.h"
@ -111,7 +112,8 @@ static int stats_collect_periodic(struct hook *h)
{
struct stats_collect *p = h->_vd;
stats_print_periodic(&p->stats, p->output, p->format, p->verbose, h->path);
if (h->path->state == STATE_STARTED)
stats_print_periodic(&p->stats, p->output, p->format, p->verbose, h->path);
return 0;
}