Skip to content

Commit

Permalink
benchmark: exit from UnconstrainedStreamingCall() when stream is canc…
Browse files Browse the repository at this point in the history
…eled (#3623)
  • Loading branch information
bboreham authored May 18, 2020
1 parent 36493bc commit f62d68d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions benchmark/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ func (s *testServer) UnconstrainedStreamingCall(stream testpb.BenchmarkService_U
err := stream.RecvMsg(in)
switch status.Code(err) {
case codes.Canceled:
return
case codes.OK:
default:
log.Fatalf("server recv error: %v", err)
Expand All @@ -125,6 +126,7 @@ func (s *testServer) UnconstrainedStreamingCall(stream testpb.BenchmarkService_U
err := stream.Send(response)
switch status.Code(err) {
case codes.Unavailable:
return
case codes.OK:
default:
log.Fatalf("server send error: %v", err)
Expand Down

0 comments on commit f62d68d

Please sign in to comment.