[client channel] if picker is null, fail call instead of crashing

pull/36167/head
Mark D. Roth 10 months ago
parent 21b5410a4c
commit 0207dd3bdd
  1. 9
      src/core/client_channel/client_channel_filter.cc

@ -2894,6 +2894,15 @@ ClientChannelFilter::LoadBalancedCall::PickSubchannel(bool was_queued) {
set_picker(chand_->picker_);
}
while (true) {
// TODO(roth): Fix race condition in channel_idle filter and any
// other possible causes of this.
if (pickers.back() == nullptr) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) {
gpr_log(GPR_ERROR, "chand=%p lb_call=%p: picker is null, failing call",
chand_, this);
}
return absl::InternalError("picker is null -- shouldn't happen");
}
// Do pick.
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) {
gpr_log(GPR_INFO, "chand=%p lb_call=%p: performing pick with picker=%p",

Loading…
Cancel
Save