Skip to content

Connection lost when sending i32 with value 0 in stream ttrpc  #207

@studychao

Description

@studychao

Description of problem

If we set proto like this in stream (take the example from : https://github.com/containerd/ttrpc-rust/blob/master/example/protocols/protos/streaming.proto)

rpc DivideStream(Sum) returns (stream Part);

If the Sum here contains i32 like

message Sum {
	int32 sum = 1;
	int32 num = 2;
}

and that all i32 values (sum and num) are 0.
⚠️To reproduce the problem, all i32 must be 0, if only sum is 0 or num is 0, then the connection will not lost

In the above case, the connection must be lost. The client side won't return any error and the server side won't receive anything.

This is pretty easy to reproduce, you can change

sum: 392,
num: 4,
sum and num value to 0, and then run the example, then you could find out that server side could not receiver the message

Expected result

server side receive the message

Actual result

The client side won't return any error and the server side won't receive anything.

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