diff --git a/pkg/consuldp/consul_dataplane.go b/pkg/consuldp/consul_dataplane.go index 5910a4bb..f672efaf 100644 --- a/pkg/consuldp/consul_dataplane.go +++ b/pkg/consuldp/consul_dataplane.go @@ -205,10 +205,8 @@ func (cdp *ConsulDataplane) Run(ctx context.Context) error { // return before configuring them. if cdp.cfg.Mode == ModeTypeDNSProxy { go func() { - select { - case <-ctx.Done(): - doneCh <- nil - } + <-ctx.Done() + doneCh <- nil }() return <-doneCh }