From 5a5cf1a2ebb5f195d26474a184960eedbd09b92e Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 8 Apr 2020 13:29:55 +0200 Subject: [PATCH] RequestCertificateHandler(): don't disconnect nodes already integrated into the cluster ... not to cause a reconnect loop. --- lib/remote/jsonrpcconnection-pki.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/remote/jsonrpcconnection-pki.cpp b/lib/remote/jsonrpcconnection-pki.cpp index 776043843..d669b378a 100644 --- a/lib/remote/jsonrpcconnection-pki.cpp +++ b/lib/remote/jsonrpcconnection-pki.cpp @@ -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; }