Merge pull request #7970 from Icinga/bugfix/reconnect-loop

RequestCertificateHandler(): don't disconnect nodes already integrated into the cluster
This commit is contained in:
Noah Hilverling 2020-04-27 13:05:22 +02:00 committed by GitHub
commit d5d89b7f39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -249,7 +249,13 @@ delayed_request:
Log(LogInformation, "JsonRpcConnection")
<< "Certificate request for CN '" << cn << "' is pending. Waiting for approval.";
client->Disconnect();
if (origin) {
auto client (origin->FromClient);
if (client && !client->GetEndpoint()) {
client->Disconnect();
}
}
return result;
}