Skip to content

Commit

Permalink
pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
eshitachandwani committed Dec 20, 2024
1 parent 5dc893c commit 69253c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/resolver/delegatingresolver/delegatingresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,11 @@ func New(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOpti
// resolution should be handled by the proxy, not the client. Therefore, we
// bypass the target resolver and store the unresolved target address.
if target.URL.Scheme == "dns" && !targetResolutionEnabled {
(*r.targetResolverState).Addresses = []resolver.Address{{Addr: target.Endpoint()}}
r.targetResolverState.Endpoints = []resolver.Endpoint{{Addresses: []resolver.Address{{Addr: target.Endpoint()}}}}
state := resolver.State{
Addresses: []resolver.Address{{Addr: target.Endpoint()}},
Endpoints: []resolver.Endpoint{{Addresses: []resolver.Address{{Addr: target.Endpoint()}}}},
}
r.targetResolverState = &state
} else {
wcc := &wrappingClientConn{
stateListener: r.updateTargetResolverState,
Expand Down

0 comments on commit 69253c7

Please sign in to comment.