Don't permanetly disable a destination because of denied access (#12971)

dont make denied destination permanent
This commit is contained in:
Emmanuel Vasilakis 2022-05-20 15:10:37 +03:00 committed by GitHub
parent 68283aa057
commit 8df044d5d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -437,6 +437,7 @@ int connect_to_one_of_destinations(
} else if (d->disabled_already_streaming && (d->disabled_already_streaming + 30 > now_realtime_sec())) {
continue;
} else if (d->disabled_because_of_denied_access) {
d->disabled_because_of_denied_access = 0;
continue;
}

View File

@ -502,7 +502,8 @@ if(!s->rrdpush_compression)
else if(version == -4) {
error("STREAM %s [send to %s]: remote server denied access for [%s].", host->hostname, s->connected_to, host->hostname);
rrdpush_sender_thread_close_socket(host);
host->destination->disabled_because_of_denied_access = 1;
if (host->destination->next)
host->destination->disabled_because_of_denied_access = 1;
return 0;
}
s->version = version;