fix resolver crash when DNS server unreachable

pull/15134/head
Jan Tattermusch 7 years ago
parent 2abcac2d7a
commit b1990ac37f
  1. 5
      src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc

@ -153,7 +153,10 @@ static void grpc_ares_request_unref(grpc_ares_request* r) {
/* If there are no pending queries, invoke on_done callback and destroy the
request */
if (gpr_unref(&r->pending_queries)) {
grpc_cares_wrapper_address_sorting_sort(*(r->lb_addrs_out));
grpc_lb_addresses* lb_addrs = *(r->lb_addrs_out);
if (lb_addrs != nullptr) {
grpc_cares_wrapper_address_sorting_sort(lb_addrs);
}
GRPC_CLOSURE_SCHED(r->on_done, r->error);
gpr_mu_destroy(&r->mu);
grpc_ares_ev_driver_destroy(r->ev_driver);

Loading…
Cancel
Save