diff --git a/server/core/service.cc b/server/core/service.cc index b6fe71c83..105fa052b 100644 --- a/server/core/service.cc +++ b/server/core/service.cc @@ -1621,6 +1621,11 @@ int service_refresh_users(SERVICE *service) ss_dassert(self >= 0); time_t now = time(NULL); + if ((service->capabilities & ACAP_TYPE_ASYNC) == 0) + { + spinlock_acquire(&service->spin); + } + /* Check if refresh rate limit has been exceeded */ if ((now < service->rate_limits[self].last + USERS_REFRESH_TIME) || (service->rate_limits[self].nloads >= USERS_REFRESH_MAX_PER_TIME)) @@ -1669,6 +1674,11 @@ int service_refresh_users(SERVICE *service) } } + if ((service->capabilities & ACAP_TYPE_ASYNC) == 0) + { + spinlock_release(&service->spin); + } + return ret; } diff --git a/server/modules/authenticator/MySQLAuth/mysql_auth.c b/server/modules/authenticator/MySQLAuth/mysql_auth.c index 25aee7e13..d9b0d4614 100644 --- a/server/modules/authenticator/MySQLAuth/mysql_auth.c +++ b/server/modules/authenticator/MySQLAuth/mysql_auth.c @@ -98,7 +98,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_AUTHENTICATOR_VERSION, "The MySQL client to MaxScale authenticator implementation", "V1.1.0", - MXS_NO_MODULE_CAPABILITIES, + ACAP_TYPE_ASYNC, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */