Merge pull request #8230 from Icinga/bugfix/open-connections-2116

Fix open connections when agent waits for CA approval
This commit is contained in:
Noah Hilverling 2020-09-14 09:32:31 +02:00 committed by GitHub
commit 198090d072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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