Skip to content

Commit

Permalink
transport: update xds directpath xds scheme (#1357)
Browse files Browse the repository at this point in the history
Follow grpc/grpc-go#5044 to update the xds scheme for DirectPath.
  • Loading branch information
mohanli-ml committed Dec 21, 2021
1 parent 0f5a4b2 commit 07d8e2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transport/grpc/dial.go
Expand Up @@ -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:///") {
Expand Down

0 comments on commit 07d8e2c

Please sign in to comment.