File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ func main() {
4747 opts .HandshakerServiceAddress = * hsAddr
4848 }
4949 altsTC := alts .NewClientCreds (opts )
50- // Block until the server is ready.
5150 conn , err := grpc .NewClient (* serverAddr , grpc .WithTransportCredentials (altsTC ))
5251 if err != nil {
5352 logger .Fatalf ("grpc.NewClient(%q) = %v" , * serverAddr , err )
@@ -58,7 +57,8 @@ func main() {
5857 // Call the EmptyCall API.
5958 ctx := context .Background ()
6059 request := & testpb.Empty {}
61- if _ , err := grpcClient .EmptyCall (ctx , request ); err != nil {
60+ // Block until the server is ready.
61+ if _ , err := grpcClient .EmptyCall (ctx , request , grpc .WaitForReady (true )); err != nil {
6262 logger .Fatalf ("grpc Client: EmptyCall(_, %v) failed: %v" , request , err )
6363 }
6464 logger .Info ("grpc Client: empty call succeeded" )
You can’t perform that action at this time.
0 commit comments