diff --git a/agent/grpc-internal/resolver/registry.go b/agent/grpc-internal/resolver/registry.go index 650915becc32..5151cfd46ce0 100644 --- a/agent/grpc-internal/resolver/registry.go +++ b/agent/grpc-internal/resolver/registry.go @@ -23,10 +23,10 @@ func (r *registry) Build(target resolver.Target, cc resolver.ClientConn, opts re r.lock.RLock() defer r.lock.RUnlock() //nolint:staticcheck - res, ok := r.byAuthority[target.Authority] + res, ok := r.byAuthority[target.URL.Host] if !ok { //nolint:staticcheck - return nil, fmt.Errorf("no resolver registered for %v", target.Authority) + return nil, fmt.Errorf("no resolver registered for %v", target.URL.Host) } return res.Build(target, cc, opts) }