Merge pull request #22173 from grpc/vjpai-patch-1

Document that non-OK status gives no message on unary Finish
pull/22101/head
Vijay Pai 5 years ago committed by GitHub
commit bc1867b0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      include/grpcpp/impl/codegen/server_callback_impl.h

@ -695,7 +695,7 @@ class ServerUnaryReactor : public internal::ServerReactor {
ServerUnaryReactor() : call_(nullptr) {}
~ServerUnaryReactor() = default;
/// The following operation initiations are exactly like ServerBidiReactor.
/// StartSendInitialMetadata is exactly like ServerBidiReactor.
void StartSendInitialMetadata() {
ServerCallbackUnary* call = call_.load(std::memory_order_acquire);
if (call == nullptr) {
@ -708,6 +708,9 @@ class ServerUnaryReactor : public internal::ServerReactor {
}
call->SendInitialMetadata();
}
/// Finish is similar to ServerBidiReactor except for one detail.
/// If the status is non-OK, any message will not be sent. Instead,
/// the client will only receive the status and any trailing metadata.
void Finish(::grpc::Status s) {
ServerCallbackUnary* call = call_.load(std::memory_order_acquire);
if (call == nullptr) {

Loading…
Cancel
Save