Merge pull request #15136 from jtattermusch/backport_pr_15134

Backport: fix resolver crash when DNS server unreachable to v1.11.x
pull/15037/merge
Jan Tattermusch 7 years ago committed by GitHub
commit 2fa982d945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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