Merge pull request #16892 from ncteisen/channelz-fix

Assume UNKNOWN if No Status
pull/16860/head
Noah Eisen 7 years ago committed by GitHub
commit 17048446cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/core/ext/filters/client_channel/subchannel.cc

@ -760,9 +760,12 @@ static void get_call_status(grpc_subchannel_call* call,
grpc_error_get_status(error, call->deadline, status, nullptr, nullptr,
nullptr);
} else {
GPR_ASSERT(md_batch->idx.named.grpc_status != nullptr);
*status =
grpc_get_status_code_from_metadata(md_batch->idx.named.grpc_status->md);
if (md_batch->idx.named.grpc_status != nullptr) {
*status = grpc_get_status_code_from_metadata(
md_batch->idx.named.grpc_status->md);
} else {
*status = GRPC_STATUS_UNKNOWN;
}
}
GRPC_ERROR_UNREF(error);
}

Loading…
Cancel
Save