From 6ee5307624af3aca9c4a79fde17af7c4e26b7044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 9 Jan 2018 13:29:30 +0200 Subject: [PATCH] Only pre-seed asynchronous authenticators Only asynchronous authenticators require the thread-specific loading of users as the synchronous ones all share the same data. If the service does not declare asynchronous capabilities at startup, the users are not seeded. This prevents unnecessary loading of users at startup. --- server/core/service.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/core/service.cc b/server/core/service.cc index 68ff8fc1c..210d7e686 100644 --- a/server/core/service.cc +++ b/server/core/service.cc @@ -2837,7 +2837,10 @@ bool service_thread_init() for (SERVICE* service = allServices; service; service = service->next) { - service_refresh_users(service); + if (service->capabilities & ACAP_TYPE_ASYNC) + { + service_refresh_users(service); + } } spinlock_release(&service_spin);