ApiListener#max_anonymous_clients: default to amount of endpoints x 2

This commit is contained in:
Alexander A. Klimov 2020-11-10 11:23:11 +01:00
parent a65f2d6b41
commit fffb1e080f

View file

@ -310,6 +310,10 @@ void ApiListener::Start(bool runtimeCreated)
m_ApiPackageIntegrityTimer->Start();
OnMasterChanged(true);
if (GetMaxAnonymousClients() < 0) {
SetMaxAnonymousClients(ConfigType::GetObjectsByType<Endpoint>().size() * 2u, true);
}
}
void ApiListener::RenewOwnCert()