From fffb1e080fab8e63e38a017396753eb122a0e678 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 10 Nov 2020 11:23:11 +0100 Subject: [PATCH] ApiListener#max_anonymous_clients: default to amount of endpoints x 2 --- lib/remote/apilistener.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index db024c987..e17c4589c 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -310,6 +310,10 @@ void ApiListener::Start(bool runtimeCreated) m_ApiPackageIntegrityTimer->Start(); OnMasterChanged(true); + + if (GetMaxAnonymousClients() < 0) { + SetMaxAnonymousClients(ConfigType::GetObjectsByType().size() * 2u, true); + } } void ApiListener::RenewOwnCert()