diff --git a/services.go b/services.go index f22a2e1..6d092bf 100644 --- a/services.go +++ b/services.go @@ -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)