checked for exit status before committing values to the database, to avoid the spikes generated for the last value when netdata exits
Costa Tsaousis (ktsaou) committed
Jun 11, 2016 at 15:24 UTC
d0942c70261af343f6dcb6fa581ad18df06757d2
1 file changed
+3
src/rrd.c
+3
@@ -18,6 +18,7 @@
18
#include "log.h"
19
#include "appconfig.h"
20
21
+#include "main.h"
22
#include "rrd.h"
23
24
#define RRD_DEFAULT_GAP_INTERPOLATIONS 1
@@ -810,6 +811,8 @@ void rrdset_next_plugins(RRDSET *st)
811
812
unsigned long long rrdset_done(RRDSET *st)
813
{
814
+ if(unlikely(netdata_exit)) return 0;
815
+
816
debug(D_RRD_CALLS, "rrdset_done() for chart %s", st->name);
817
818
RRDDIM *rd, *last;