consul: start service watch as goroutine

This commit is contained in:
Fabian Reinartz 2016-11-27 11:01:16 +01:00
parent ecad074e46
commit 35da23fd82

View file

@ -197,7 +197,7 @@ func (cd *Discovery) Run(ctx context.Context, ch chan<- []*config.TargetGroup) {
}
wctx, cancel := context.WithCancel(ctx)
srv.watch(wctx, ch)
go srv.watch(wctx, ch)
services[name] = cancel
}