diff --git a/rules/manager.go b/rules/manager.go index 50c4c8b7f..509e7d874 100644 --- a/rules/manager.go +++ b/rules/manager.go @@ -921,7 +921,7 @@ func (m *Manager) Update(interval time.Duration, files []string, externalLabels } wg.Add(1) - go func(newg *Group) { + go func(newg *Group, oldg *Group) { if ok { oldg.stop() newg.CopyState(oldg) @@ -934,7 +934,7 @@ func (m *Manager) Update(interval time.Duration, files []string, externalLabels newg.run(m.opts.Context) }() wg.Done() - }(newg) + }(newg, oldg) } // Stop remaining old groups.