mirror of
https://github.com/prometheus/alertmanager
synced 2025-02-16 10:37:09 +00:00
fix memory visibility error (#1936)
Signed-off-by: denghuan <denghuan@actionsky.com>
This commit is contained in:
parent
9d5a7a271a
commit
5ff6cffa08
@ -312,7 +312,9 @@ func newAggrGroup(ctx context.Context, labels model.LabelSet, r *Route, to func(
|
|||||||
opts: &r.RouteOpts,
|
opts: &r.RouteOpts,
|
||||||
timeout: to,
|
timeout: to,
|
||||||
alerts: store.NewAlerts(15 * time.Minute),
|
alerts: store.NewAlerts(15 * time.Minute),
|
||||||
|
done: make(chan struct{}),
|
||||||
}
|
}
|
||||||
|
|
||||||
ag.ctx, ag.cancel = context.WithCancel(ctx)
|
ag.ctx, ag.cancel = context.WithCancel(ctx)
|
||||||
ag.alerts.Run(ag.ctx)
|
ag.alerts.Run(ag.ctx)
|
||||||
|
|
||||||
@ -338,8 +340,6 @@ func (ag *aggrGroup) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ag *aggrGroup) run(nf notifyFunc) {
|
func (ag *aggrGroup) run(nf notifyFunc) {
|
||||||
ag.done = make(chan struct{})
|
|
||||||
|
|
||||||
defer close(ag.done)
|
defer close(ag.done)
|
||||||
defer ag.next.Stop()
|
defer ag.next.Stop()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user