Skip to content

Commit 2456c5c

Browse files
authored
Allow using interop client for making Traffic Director RPCs (#4291)
1 parent 80e380e commit 2456c5c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

interop/client/client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
"google.golang.org/grpc/interop"
3535
"google.golang.org/grpc/resolver"
3636
"google.golang.org/grpc/testdata"
37+
_ "google.golang.org/grpc/xds/googledirectpath"
3738

3839
testgrpc "google.golang.org/grpc/interop/grpc_testing"
3940
)
@@ -126,7 +127,10 @@ func main() {
126127
}
127128

128129
resolver.SetDefaultScheme("dns")
129-
serverAddr := net.JoinHostPort(*serverHost, strconv.Itoa(*serverPort))
130+
serverAddr := *serverHost
131+
if *serverPort != 0 {
132+
serverAddr = net.JoinHostPort(*serverHost, strconv.Itoa(*serverPort))
133+
}
130134
var opts []grpc.DialOption
131135
switch credsChosen {
132136
case credsTLS:

0 commit comments

Comments
 (0)