Merge pull request #20466 from soheilhy/fix-call-op-str

Fix the internal build and test failure introduced in #20329
pull/20353/head
Soheil Hassas Yeganeh 5 years ago committed by GitHub
commit fd13c0b9c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      include/grpcpp/impl/codegen/call_op_set.h

@ -772,9 +772,8 @@ class CallOpClientRecvStatus {
void FinishOp(bool* /*status*/) {
if (recv_status_ == nullptr || hijacked_) return;
if (status_code_ == StatusCode::OK) {
if (static_cast<StatusCode>(status_code_) == StatusCode::OK) {
*recv_status_ = Status();
GPR_CODEGEN_DEBUG_ASSERT(GRPC_SLICE_IS_EMPTY(error_message_));
GPR_CODEGEN_DEBUG_ASSERT(debug_error_string_ == nullptr);
} else {
*recv_status_ =
@ -784,12 +783,14 @@ class CallOpClientRecvStatus {
: grpc::string(GRPC_SLICE_START_PTR(error_message_),
GRPC_SLICE_END_PTR(error_message_)),
metadata_map_->GetBinaryErrorDetails());
g_core_codegen_interface->grpc_slice_unref(error_message_);
if (debug_error_string_ != nullptr) {
client_context_->set_debug_error_string(debug_error_string_);
g_core_codegen_interface->gpr_free((void*)debug_error_string_);
}
}
// TODO(soheil): Find callers that set debug string even for status OK,
// and fix them.
g_core_codegen_interface->grpc_slice_unref(error_message_);
}
void SetInterceptionHookPoint(

Loading…
Cancel
Save