grpc/grpc-node

When response stream includes messages and then an error, final message(s) can be dropped

jhump opened this issue · 1 comments

If the server sends back a sequence of response messages (in a server-stream or bidi-stream RPC) followed by an error status, the client can miss the final message in the stream.

The behavior is not consistent, which suggests some sort of race condition between the error being received on the network and the application code being notified of the last message. It behaves as if, when the error is received on the network, it discards any pending messages that haven’t yet been delivered to the application’s “data” event handler.

In general, we do not guarantee delivery of all messages if the stream ends with a non-OK status.