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.
grpc-java/stub/src/main/java/io/grpc/stub/ServerCalls.java
Lines 336 to 349 in b220178
See #5968 and grpc/grpc#12824