fix memory visibility error (#1936)

Signed-off-by: denghuan <denghuan@actionsky.com>
This commit is contained in:
bigMacro 2019-06-25 16:11:45 +08:00 committed by Simon Pasquier
parent 9d5a7a271a
commit 5ff6cffa08
1 changed files with 2 additions and 2 deletions

View File

@ -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()