Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dns: introduce ResolutionStatus for ResolveCb and fix #9927 #10137

Merged
merged 15 commits into from
Feb 28, 2020
Prev Previous commit
Next Next commit
missing commit
Signed-off-by: Jose Nino <jnino@lyft.com>
  • Loading branch information
Jose Nino committed Feb 25, 2020
commit a2385e4e3ae483027898ab45e36c352e8234528e
5 changes: 4 additions & 1 deletion source/common/upstream/logical_dns_cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ void LogicalDnsCluster::startResolve() {
}

std::chrono::milliseconds refresh_rate = dns_refresh_rate_ms_;
if (status == Network::DnsResolver::ResolutionStatus::Success) {
// TODO(junr03): update in subsequent PR. The logical dns cluster could update is
// current_resolved_address_ to null if the cluster receives a successful, but empty DNS
// response.
if (status == Network::DnsResolver::ResolutionStatus::Success && !response.empty()) {
// TODO(mattklein123): Move port handling into the DNS interface.
ASSERT(response.front().address_ != nullptr);
Network::Address::InstanceConstSharedPtr new_address =
Expand Down