From 2051ae2e6afab3184925124acb28cf83c5dbaf40 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Sun, 1 Mar 2020 19:32:14 +0100 Subject: [PATCH] Revert "Fix race condition in Rule manager.Update() function" This reverts commit 8b11d2cfb6f9a7ae37bd402ca5176da034c572f8. Signed-off-by: Julien Pivotto --- rules/manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/manager.go b/rules/manager.go index 509e7d874..50c4c8b7f 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, oldg *Group) { + go func(newg *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, oldg) + }(newg) } // Stop remaining old groups.