diff --git a/internal/outpost/ldap/refresh.go b/internal/outpost/ldap/refresh.go index a79417b40..dec2fc7d1 100644 --- a/internal/outpost/ldap/refresh.go +++ b/internal/outpost/ldap/refresh.go @@ -45,8 +45,9 @@ func (ls *LDAPServer) Refresh() error { existing := ls.getCurrentProvider(provider.Pk) users := make(map[string]flags.UserFlags) if existing != nil { - existing.boundUsersMutex.Unlock() + existing.boundUsersMutex.RLock() users = existing.boundUsers + existing.boundUsersMutex.RUnlock() } providers[idx] = &ProviderInstance{