grpc / grpc/grpc-java

async server: need to ignore unary response msg if status is not OK

Open
#5,969 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

The expectation for unary responses is that the server will respond with an message or an error. If the server responds with a message and an error, the message should be thrown away. The async API currently would send the message. For unary responses, we should delay sending the response until the onComplete()/onError(). If onError() is called we should not send the message.

https://github.com/grpc/grpc-java/blob/b22017851560197a41015acd90f443f7b9519984/stub/src/main/java/io/grpc/stub/ServerCalls.java#L336-L349

See #5968 and grpc/grpc#12824

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.