diff --git a/pkg/indexgateway/client.go b/pkg/indexgateway/client.go index 3d4abd0e79a1e..b5e05b7e26ecd 100644 --- a/pkg/indexgateway/client.go +++ b/pkg/indexgateway/client.go @@ -210,7 +210,9 @@ func (s *GatewayClient) Stop() { if err != nil { level.Error(s.logger).Log("msg", "failed to stop index gateway connection pool", "err", err) } - s.dnsProvider.Stop() + if s.cfg.Mode == SimpleMode { + s.dnsProvider.Stop() + } } func (s *GatewayClient) QueryPages(ctx context.Context, queries []index.Query, callback index.QueryPagesCallback) error {