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,
|
||||
timeout: to,
|
||||
alerts: store.NewAlerts(15 * time.Minute),
|
||||
done: make(chan struct{}),
|
||||
}
|
||||
|
||||
ag.ctx, ag.cancel = context.WithCancel(ctx)
|
||||
ag.alerts.Run(ag.ctx)
|
||||
|
||||
|
@ -338,8 +340,6 @@ func (ag *aggrGroup) String() string {
|
|||
}
|
||||
|
||||
func (ag *aggrGroup) run(nf notifyFunc) {
|
||||
ag.done = make(chan struct{})
|
||||
|
||||
defer close(ag.done)
|
||||
defer ag.next.Stop()
|
||||
|
||||
|
|
Loading…
Reference in New Issue