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.
This commit is contained in:
Tatsuhiro Tsujikawa 2016-12-11 10:39:19 +09:00
parent a06a8c36a4
commit fd403a85c8
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ int DualDNSResolver::get_status(Address *result) const {
if (rv4 == DNS_STATUS_RUNNING || rv6 == DNS_STATUS_RUNNING) { if (rv4 == DNS_STATUS_RUNNING || rv6 == DNS_STATUS_RUNNING) {
return 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_ERROR;
} }
return DNS_STATUS_IDLE; return DNS_STATUS_IDLE;