File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
examples/features/stream/client Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ func clientStream(ctx context.Context, proxy pb.TestStreamClientProxy) error {
8686 // Call Send to continuously send data.
8787 if err = streamClient .Send (& pb.HelloReq {Msg : fmt .Sprintf ("ping : %v" , i )}); err != nil {
8888 log .ErrorContextf (ctx , "ClientStream send error: %v" , err )
89- break
89+ return err
9090 }
9191 }
9292
@@ -134,7 +134,7 @@ func bidirectionalStream(ctx context.Context, proxy pb.TestStreamClientProxy) er
134134 // The client send request data to the server 5 times using a for loop.
135135 if err = streamClient .Send (& pb.HelloReq {Msg : "ping: " + strconv .Itoa (i )}); err != nil {
136136 log .ErrorContextf (ctx , "BidirectionalStream Send message error: %v" , err )
137- break
137+ return err
138138 }
139139 }
140140
@@ -153,6 +153,7 @@ func bidirectionalStream(ctx context.Context, proxy pb.TestStreamClientProxy) er
153153 }
154154 if err != nil {
155155 log .ErrorContextf (ctx , "BidirectionalStream receive error from server: %v" , err )
156+ break
156157 }
157158 log .InfoContextf (ctx , "BidirectionalStream reply message is: %s" , rsp .GetMsg ())
158159 }
You can’t perform that action at this time.
0 commit comments