From fd403a85c8f2b4ce18a8fb62f98b694b36f1acf6 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 11 Dec 2016 10:39:19 +0900 Subject: [PATCH] nghttpx: Just return DNS_STATUS_ERROR At the moment, we use both resolvers, and if either one is not DNS_STATUS_IDLE, the other one is also not DNS_STATUS_IDLE. This may change if we are going to configure DNS so that either A or AAAA lookup is done. In that case, it is better to just return DNS_STATUS_ERROR in the diff. This is because the calling side does not expect DNS_STATUS_IDLE in that case. --- src/shrpx_dual_dns_resolver.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shrpx_dual_dns_resolver.cc b/src/shrpx_dual_dns_resolver.cc index 82145628..5f75ef4a 100644 --- a/src/shrpx_dual_dns_resolver.cc +++ b/src/shrpx_dual_dns_resolver.cc @@ -78,7 +78,7 @@ int DualDNSResolver::get_status(Address *result) const { if (rv4 == DNS_STATUS_RUNNING || rv6 == DNS_STATUS_RUNNING) { return DNS_STATUS_RUNNING; } - if (rv4 == DNS_STATUS_ERROR && rv6 == DNS_STATUS_ERROR) { + if (rv4 == DNS_STATUS_ERROR || rv6 == DNS_STATUS_ERROR) { return DNS_STATUS_ERROR; } return DNS_STATUS_IDLE;