Fix test failure

reviewable/pr18946/r7
Yash Tibrewal 6 years ago
parent b53465c106
commit 3c4e8a9be2
  1. 8
      src/core/ext/filters/client_channel/client_channel.cc

@ -1265,8 +1265,12 @@ bool ChannelData::ProcessResolverResultLocked(
strcmp(service_config->service_config_json(),
chand->saved_service_config_->service_config_json()) != 0);
if (service_config_changed) {
service_config_json.reset(
gpr_strdup(service_config->service_config_json()));
if (service_config != nullptr) {
service_config_json.reset(
gpr_strdup(service_config->service_config_json()));
} else {
service_config_json.reset(gpr_strdup(""));
}
if (grpc_client_channel_routing_trace.enabled()) {
gpr_log(GPR_INFO, "chand=%p: resolver returned service config: \"%s\"",
chand, service_config_json.get());

Loading…
Cancel
Save