diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-01-14 13:18:08 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-01-14 13:18:08 +0200 |
commit | 78c8a6bad687723c43930be4307b051af3977c22 (patch) | |
tree | 4ab56118f0388d14753d51d2d60ebc06ffc8951e /src/health.c | |
parent | 70dd96e14ac491bfa5567eefe516084114516537 (diff) |
improved netdata cleanup/exit procedure
Diffstat (limited to 'src/health.c')
-rwxr-xr-x | src/health.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/health.c b/src/health.c index dd2d82644e..5469c30ef9 100755 --- a/src/health.c +++ b/src/health.c @@ -2806,7 +2806,7 @@ static inline int rrdcalc_isrunnable(RRDCALC *rc, time_t now, time_t *next_run) } void *health_main(void *ptr) { - (void)ptr; + struct netdata_static_thread *static_thread = (struct netdata_static_thread *)ptr; info("HEALTH thread created with task id %d", gettid()); @@ -3113,6 +3113,9 @@ void *health_main(void *ptr) { buffer_free(wb); info("HEALTH thread exiting"); + + static_thread->enabled = 0; + static_thread->thread = NULL; pthread_exit(NULL); return NULL; } |