From f9584a00cf39f6c541853c135f45da74191bfdeb Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 1 Jul 2016 09:32:29 -0700 Subject: [PATCH] Move the server-side handling code from StreamingOutputCall to FullDuplexCall. --- interop/test_utils.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interop/test_utils.go b/interop/test_utils.go index 8275c43e..d8ecccd3 100644 --- a/interop/test_utils.go +++ b/interop/test_utils.go @@ -542,10 +542,6 @@ func (s *testServer) UnaryCall(ctx context.Context, in *testpb.SimpleRequest) (* } func (s *testServer) StreamingOutputCall(args *testpb.StreamingOutputCallRequest, stream testpb.TestService_StreamingOutputCallServer) error { - resp := args.GetResponseStatus() - if resp != nil && *resp.Code != 0 { - return grpc.Errorf(codes.Code(*resp.Code), *resp.Message) - } cs := args.GetResponseParameters() for _, c := range cs { if us := c.GetIntervalUs(); us > 0 { @@ -591,6 +587,10 @@ func (s *testServer) FullDuplexCall(stream testpb.TestService_FullDuplexCallServ if err != nil { return err } + resp := in.GetResponseStatus() + if resp != nil && *resp.Code != 0 { + return grpc.Errorf(codes.Code(*resp.Code), *resp.Message) + } cs := in.GetResponseParameters() for _, c := range cs { if us := c.GetIntervalUs(); us > 0 {