From d5fd62bbffc3908caa69c6b273d212412f40aa09 Mon Sep 17 00:00:00 2001 From: Shawn Date: Thu, 17 Sep 2020 13:07:43 +0800 Subject: [PATCH] use read lock (#125) --- source/manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/manager.go b/source/manager.go index 3f32bafb..e6b22b4e 100755 --- a/source/manager.go +++ b/source/manager.go @@ -191,8 +191,8 @@ func (m *Manager) pullSourceConfigs(source string) error { func (m *Manager) Configs() map[string]interface{} { config := make(map[string]interface{}, 0) - m.configMapMux.Lock() - defer m.configMapMux.Unlock() + m.configMapMux.RLock() + defer m.configMapMux.RUnlock() for key, sourceName := range m.ConfigurationMap { sValue := m.configValueBySource(key, sourceName)