Skip to content

Empty Proto Hangs Server Streaming RPC #169

@powturns

Description

@powturns

Description of problem

If a client makes a request to a server streaming RPC (eg: rpc DivideStream(Sum) returns (stream Part);) using a default request (eg: streaming::Sum { ..Default::default() }), the call hangs indefinitely. This can easily be observed by modifying the async-stream-client example to send an empty Sum

The root cause is twofold:

  1. Empty / Default proto messages serialize to an empty vector
  2. The server implementation does not attempt to deliver an empty payload (I think because it assumes it will be receiving DATA messages soon, but the client sends only the request).

Expected result

The server processes the request and returns the stream to the client.

Actual result

The server does not execute the corresponding method. The client waits indefinitely for a response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions