Ignore proper draining for now with a giant BUG.  I am surprised that it
re-emits closed when the damn thing is closed.
Am 19.07.2013 15:04 schrieb "juliusv" <notifications@github.com>:

> In manager/aggregator.go:
>
> > @@ -288,8 +288,11 @@ func (a *Aggregator) Dispatch(s SummaryReceiver) {
> >  			log.Println("Deleting expired aggregation instance", a)
> >  			a.Aggregates[fp].Close()
> >  			delete(a.Aggregates, fp)
> > +
> > +		case req := <-a.closeRequests:
> > +			a.closeInternal()
> > +			req.done <- true
> > +			return
>
> There's another problem: when a channel is closed, the select case for it
> will not only be triggered once, but repeatedly in the for loop. So the
> closed counter is incremented multiple times for the same channel, until
> this has happened often enough that the for loop will exit. So we must
> either track closedness separately per channel or we ignore proper draining
> for now and fix it up later.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/prometheus/alert_manager/pull/2/files#r5291343>
> .
>