nghttpx: Handle c-ares success without result

This commit is contained in:
Tatsuhiro Tsujikawa 2017-01-03 14:35:05 +09:00
parent 3933280d29
commit 55ecb082ee
1 changed files with 7 additions and 1 deletions

View File

@ -298,7 +298,13 @@ void DNSResolver::on_result(int status, hostent *hostent) {
}
auto ap = *hostent->h_addr_list;
assert(ap);
if (!ap) {
if (LOG_ENABLED(INFO)) {
LOG(INFO) << "Name lookup for " << name_ << "failed: no address returned";
}
status_ = DNS_STATUS_ERROR;
return;
}
switch (hostent->h_addrtype) {
case AF_INET: