From 4cfbf6eb17192d41085e502442edfb65388cc053 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 30 Aug 2017 15:02:48 +0200 Subject: [PATCH] Disconnect all clients when we update our own certificate refs #5450 --- lib/remote/apilistener.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index ad63b3a17..d298bbe1e 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -122,6 +122,16 @@ void ApiListener::UpdateSSLContext(void) } m_SSLContext = context; + + for (const Endpoint::Ptr& endpoint : ConfigType::GetObjectsByType()) { + for (const JsonRpcConnection::Ptr& client : endpoint->GetClients()) { + client->Disconnect(); + } + } + + for (const JsonRpcConnection::Ptr& client : m_AnonymousClients) { + client->Disconnect(); + } } void ApiListener::OnAllConfigLoaded(void)