From 07d8e2cfeb1bbc3e14685df4fc31713e5cda4167 Mon Sep 17 00:00:00 2001 From: Mohan Li <67390330+mohanli-ml@users.noreply.github.com> Date: Tue, 21 Dec 2021 09:22:42 -0800 Subject: [PATCH] transport: update xds directpath xds scheme (#1357) Follow grpc/grpc-go#5044 to update the xds scheme for DirectPath. --- transport/grpc/dial.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/grpc/dial.go b/transport/grpc/dial.go index d6a34fc6f05..c6bf60953df 100644 --- a/transport/grpc/dial.go +++ b/transport/grpc/dial.go @@ -151,9 +151,9 @@ func dial(ctx context.Context, insecure bool, o *internal.DialSettings) (*grpc.C if grpc.Version >= "1.42" && strings.EqualFold(os.Getenv(enableDirectPathXds), "true") { // google-c2p resolver target must not have a port number if addr, _, err := net.SplitHostPort(endpoint); err == nil { - endpoint = "google-c2p:///" + addr + endpoint = "google-c2p-experimental:///" + addr } else { - endpoint = "google-c2p:///" + endpoint + endpoint = "google-c2p-experimental:///" + endpoint } } else { if !strings.HasPrefix(endpoint, "dns:///") {