@cryptotaxi247 / netdata-1 / commits / 3869e7eb5

make sure disconnected_time is updated before decrementing senders

Costa Tsaousis (ktsaou) committed Mar 13, 2017 at 21:18 UTC 3869e7eb5d6bbf3d4b78d84e5b36f19a8968971f
1 file changed +1 -2
src/rrdpush.c
+1 -2
@@ -583,12 +583,11 @@ int rrdpush_receive(int fd, const char *key, const char *hostname, const char *m
583 error("STREAM %s [receive from [%s]:%s]: disconnected (completed updates %zu).", host->hostname, client_ip, client_port, count);
584
585 rrdhost_wrlock(host);
586 + host->senders_disconnected_time = now_realtime_sec();
587 host->connected_senders--;
588 if(!host->connected_senders) {
589 if(health_enabled == CONFIG_BOOLEAN_AUTO)
590 host->health_enabled = 0;
590 -
591 - host->senders_disconnected_time = now_realtime_sec();
591 }
592 rrdhost_unlock(host);
593