summaryrefslogtreecommitdiffstats
path: root/src/rrd.c
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-06-11 15:24:47 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-06-11 15:24:47 +0300
commitd0942c70261af343f6dcb6fa581ad18df06757d2 (patch)
tree5408deaf5d5864df8ea9447b8afd653be641b4bf /src/rrd.c
parent57e380bb3ec29e213e94a4ed76d8f025bfefe0a8 (diff)
checked for exit status before committing values to the database, to avoid the spikes generated for the last value when netdata exits
Diffstat (limited to 'src/rrd.c')
-rw-r--r--src/rrd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rrd.c b/src/rrd.c
index 2a134fc2a8..60e8d6f2f1 100644
--- a/src/rrd.c
+++ b/src/rrd.c
@@ -18,6 +18,7 @@
#include "log.h"
#include "appconfig.h"
+#include "main.h"
#include "rrd.h"
#define RRD_DEFAULT_GAP_INTERPOLATIONS 1
@@ -810,6 +811,8 @@ void rrdset_next_plugins(RRDSET *st)
unsigned long long rrdset_done(RRDSET *st)
{
+ if(unlikely(netdata_exit)) return 0;
+
debug(D_RRD_CALLS, "rrdset_done() for chart %s", st->name);
RRDDIM *rd, *last;