Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
Signed-off-by: Maksym Pavlenko <[email protected]>
  • Loading branch information
mxpv committed Feb 3, 2024
1 parent 6615f15 commit 44ca009
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ func (s *serviceSet) handle(ctx context.Context, req *Request, respond func(*sta
respond(st, p, stream.StreamingServer, true)
}()

// Empty proto messages serialized to 0 payloads,
// so signatures like: rpc Stream(google.protobuf.Empty) returns (stream Data);
// don't get invoked here, which causes hang on client side.
// See https://github.com/containerd/ttrpc/issues/126
if req.Payload != nil || !info.StreamingClient {
unmarshal := func(obj interface{}) error {
return protoUnmarshal(req.Payload, obj)
Expand Down

0 comments on commit 44ca009

Please sign in to comment.