]> arthur.barton.de Git - netdata.git/blobdiff - src/rrdpush.c
Merge pull request #1895 from l2isbad/web_log_improvements
[netdata.git] / src / rrdpush.c
index 069fae467eb8c8bec06b8bd73533749e1ac5d8da..f5f54d39a320e8158b2b7df2d4921510a0a6c1bc 100644 (file)
@@ -219,6 +219,8 @@ static void rrdpush_sender_thread_cleanup_locked_all(RRDHOST *host) {
     host->rrdpush_buffer = NULL;
 
     host->rrdpush_spawn = 0;
+
+    rrdhost_flag_set(host, RRDHOST_ORPHAN);
 }
 
 void rrdpush_sender_thread_stop(RRDHOST *host) {
@@ -645,6 +647,7 @@ void rrdpush_sender_thread_spawn(RRDHOST *host) {
         else if(pthread_detach(host->rrdpush_thread))
             error("STREAM %s [send]: cannot request detach newly created thread.", host->hostname);
 
+        rrdhost_flag_clear(host, RRDHOST_ORPHAN);
         host->rrdpush_spawn = 1;
     }