mirror of
https://github.com/prometheus/alertmanager
synced 2025-03-25 04:18:29 +00:00
Fix lock
This commit is contained in:
parent
78ac6859a1
commit
7ddcc42efa
@ -170,7 +170,7 @@ func (d *Dispatcher) run(it provider.AlertIterator) {
|
||||
}
|
||||
|
||||
case <-cleanup.C:
|
||||
d.mtx.RLock()
|
||||
d.mtx.Lock()
|
||||
|
||||
for _, groups := range d.aggrGroups {
|
||||
for _, ag := range groups {
|
||||
@ -181,7 +181,7 @@ func (d *Dispatcher) run(it provider.AlertIterator) {
|
||||
}
|
||||
}
|
||||
|
||||
d.mtx.RUnlock()
|
||||
d.mtx.Unlock()
|
||||
|
||||
case <-d.ctx.Done():
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user