From: Costa Tsaousis (ktsaou) Date: Mon, 13 Mar 2017 19:18:19 +0000 (+0200) Subject: make sure disconnected_time is updated before decrementing senders X-Git-Tag: ab-debian_0.20170316.01-0ab1~1^2~4^2~5 X-Git-Url: https://arthur.barton.de/gitweb/?p=netdata.git;a=commitdiff_plain;h=3869e7eb5d6bbf3d4b78d84e5b36f19a8968971f make sure disconnected_time is updated before decrementing senders --- diff --git a/src/rrdpush.c b/src/rrdpush.c index 87c4309a..40197a95 100644 --- a/src/rrdpush.c +++ b/src/rrdpush.c @@ -583,12 +583,11 @@ int rrdpush_receive(int fd, const char *key, const char *hostname, const char *m error("STREAM %s [receive from [%s]:%s]: disconnected (completed updates %zu).", host->hostname, client_ip, client_port, count); rrdhost_wrlock(host); + host->senders_disconnected_time = now_realtime_sec(); host->connected_senders--; if(!host->connected_senders) { if(health_enabled == CONFIG_BOOLEAN_AUTO) host->health_enabled = 0; - - host->senders_disconnected_time = now_realtime_sec(); } rrdhost_unlock(host);