Skip to content

Commit

Permalink
use read lock (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianxiaoliang authored Sep 17, 2020
1 parent 769555c commit d5fd62b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d5fd62b

Please sign in to comment.