Don't permanetly disable a destination because of denied access (#12971)
dont make denied destination permanent
Emmanuel Vasilakis committed
May 20, 2022 at 15:10 UTC
8df044d5d3abda58f32875d601eca670bd61b70d
2 files changed
+3
-1
streaming/rrdpush.c
+1
@@ -437,6 +437,7 @@ int connect_to_one_of_destinations(
437
} else if (d->disabled_already_streaming && (d->disabled_already_streaming + 30 > now_realtime_sec())) {
438
continue;
439
} else if (d->disabled_because_of_denied_access) {
440
+ d->disabled_because_of_denied_access = 0;
441
continue;
442
}
443
streaming/sender.c
+2
-1
@@ -502,7 +502,8 @@ if(!s->rrdpush_compression)
502
else if(version == -4) {
503
error("STREAM %s [send to %s]: remote server denied access for [%s].", host->hostname, s->connected_to, host->hostname);
504
rrdpush_sender_thread_close_socket(host);
505
- host->destination->disabled_because_of_denied_access = 1;
505
+ if (host->destination->next)
506
+ host->destination->disabled_because_of_denied_access = 1;
507
return 0;
508
}
509
s->version = version;