From 16ccefc678f76dbfc8af05f00eaa02c6e09bd6cc Mon Sep 17 00:00:00 2001 From: wgcn <1026688210@qq.com> Date: Tue, 23 Aug 2022 10:56:52 +0800 Subject: [PATCH] release manager Rlock (#18773) Signed-off-by: wanggang11335 Signed-off-by: wanggang11335 Co-authored-by: wanggang11335 --- internal/config/manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/config/manager.go b/internal/config/manager.go index c1bd5c96cc..e69de2dcc5 100644 --- a/internal/config/manager.go +++ b/internal/config/manager.go @@ -66,7 +66,7 @@ func (m *Manager) GetConfig(key string) (string, error) { //GetConfigsByPattern returns key values that matched pattern func (m *Manager) GetConfigsByPattern(pattern string) map[string]string { m.RLock() - defer m.RLock() + defer m.RUnlock() matchedConfig := make(map[string]string) pattern = strings.ToLower(pattern) for key, value := range m.keySourceMap { @@ -86,7 +86,7 @@ func (m *Manager) GetConfigsByPattern(pattern string) map[string]string { // Configs returns all the key values func (m *Manager) Configs() map[string]string { m.RLock() - defer m.RLock() + defer m.RUnlock() config := make(map[string]string) for key, value := range m.keySourceMap {