discovery: fix bug that use rlock for read. (#5928)
Signed-off-by: johncming <johncming@yahoo.com>
This commit is contained in:
parent
7d159b2f01
commit
17683d074c
|
@ -304,8 +304,8 @@ func (m *Manager) updateGroup(poolKey poolKey, tgs []*targetgroup.Group) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Manager) allGroups() map[string][]*targetgroup.Group {
|
func (m *Manager) allGroups() map[string][]*targetgroup.Group {
|
||||||
m.mtx.Lock()
|
m.mtx.RLock()
|
||||||
defer m.mtx.Unlock()
|
defer m.mtx.RUnlock()
|
||||||
|
|
||||||
tSets := map[string][]*targetgroup.Group{}
|
tSets := map[string][]*targetgroup.Group{}
|
||||||
for pkey, tsets := range m.targets {
|
for pkey, tsets := range m.targets {
|
||||||
|
|
Loading…
Reference in New Issue