Skip to content

Commit

Permalink
Merge pull request #7970 from Icinga/bugfix/reconnect-loop
Browse files Browse the repository at this point in the history
RequestCertificateHandler(): don't disconnect nodes already integrated into the cluster
  • Loading branch information
N-o-X authored Apr 27, 2020
2 parents af77689 + 5a5cf1a commit d5d89b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/remote/jsonrpcconnection-pki.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,13 @@ Value RequestCertificateHandler(const MessageOrigin::Ptr& origin, const Dictiona
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;
}
Expand Down

0 comments on commit d5d89b7

Please sign in to comment.