resolvers: fix resolvers to return channel args even when reporting an error (#28326)

pull/28319/head
Mark D. Roth 3 years ago committed by GitHub
parent 9965ece70a
commit 27cfacdfc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
  2. 1
      src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
  3. 1
      src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc

@ -373,6 +373,7 @@ void AresDnsResolver::OnResolvedLocked(grpc_error_handle error) {
Result result;
result.addresses = status;
result.service_config = status;
result.args = grpc_channel_args_copy(channel_args_);
result_handler_->ReportResult(std::move(result));
// Set retry timer.
// InvalidateNow to avoid getting stuck re-initializing this timer

@ -199,6 +199,7 @@ void NativeDnsResolver::OnResolvedLocked(grpc_error_handle error) {
Result result;
result.addresses = absl::UnavailableError(absl::StrCat(
"DNS resolution failed for ", name_to_resolve_, ": ", error_message));
result.args = grpc_channel_args_copy(channel_args_);
result_handler_->ReportResult(std::move(result));
// Set up for retry.
// InvalidateNow to avoid getting stuck re-initializing this timer

@ -147,6 +147,7 @@ void FakeResolver::MaybeSendResultLocked() {
Result result;
result.addresses = absl::UnavailableError("Resolver transient failure");
result.service_config = result.addresses.status();
result.args = grpc_channel_args_copy(channel_args_);
result_handler_->ReportResult(std::move(result));
return_failure_ = false;
} else if (has_next_result_) {

Loading…
Cancel
Save