Fix handling of empty payloads
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
336fc1b6b4
commit
dea99e9d05
@ -420,9 +420,6 @@ func emptyPayloadStream(ctx context.Context, client streaming.TTRPCStreamingClie
|
||||
}
|
||||
}
|
||||
|
||||
if err := stream.CloseSend(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := stream.Recv(); err != io.EOF {
|
||||
t.Fatalf("Expected io.EOF, got %v", err)
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ func (s *serviceSet) handle(ctx context.Context, req *Request, respond func(*sta
|
||||
respond(st, p, stream.StreamingServer, true)
|
||||
}()
|
||||
|
||||
if req.Payload != nil {
|
||||
if req.Payload != nil || !info.StreamingClient {
|
||||
unmarshal := func(obj interface{}) error {
|
||||
return protoUnmarshal(req.Payload, obj)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user