]> arthur.barton.de Git - netdata.git/blobdiff - src/rrdhost.c
avoid code duplication
[netdata.git] / src / rrdhost.c
index 658fba001290c3ab565740b4d024e06aa0ad3347..0b50731569556ddf0119bc35cdbb7ef10ffcd425 100644 (file)
@@ -396,10 +396,7 @@ void rrdhost_free(RRDHOST *host) {
     // ------------------------------------------------------------------------
     // free it
 
-    if(host->rrdpush_spawn) {
-        pthread_cancel(host->rrdpush_thread);
-        rrdpush_sender_thread_cleanup(host);
-    }
+    rrdpush_sender_thread_stop(host);
 
     freez(host->os);
     freez(host->cache_dir);