|
|
@ -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
|
|
|
|
/* If there are no pending queries, invoke on_done callback and destroy the
|
|
|
|
request */ |
|
|
|
request */ |
|
|
|
if (gpr_unref(&r->pending_queries)) { |
|
|
|
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); |
|
|
|
GRPC_CLOSURE_SCHED(r->on_done, r->error); |
|
|
|
gpr_mu_destroy(&r->mu); |
|
|
|
gpr_mu_destroy(&r->mu); |
|
|
|
grpc_ares_ev_driver_destroy(r->ev_driver); |
|
|
|
grpc_ares_ev_driver_destroy(r->ev_driver); |
|
|
|