Skip to content

Commit

Permalink
chore: [k209] fix(gateway client): exit with nil pointer dereference …
Browse files Browse the repository at this point in the history
…panic when using ring mode (#13460)

Co-authored-by: Yandi Lee <[email protected]>
  • Loading branch information
grafanabot and littlepangdi authored Jul 9, 2024
1 parent 76b780c commit 214f495
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/indexgateway/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 214f495

Please sign in to comment.