Skip to content

Commit

Permalink
discovery/dns: resolve again if err happens
Browse files Browse the repository at this point in the history
UpdateState() docs say that if an error happens then the resolver should
try again. Let's do that. Fixes a problem for us in prod.

Signed-off-by: Giedrius Statkevičius <[email protected]>
  • Loading branch information
GiedriusS committed Oct 21, 2024
1 parent 6a62128 commit 056d0fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/discovery/dns/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ func (r *resolver) run() {
raddr := grpcresolver.Address{Addr: addr}
state.Addresses = append(state.Addresses, raddr)
}
_ = r.cc.UpdateState(state)
err = r.cc.UpdateState(state)
if err != nil {
continue
}
}
select {
case <-r.ctx.Done():
Expand Down

0 comments on commit 056d0fc

Please sign in to comment.