Commit 4d1f1f23 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

shrpx: Log IP version number when getaddrinfo failed

parent 6da492c4
...@@ -147,7 +147,8 @@ evconnlistener* create_evlistener(ListenHandler *handler, int family) ...@@ -147,7 +147,8 @@ evconnlistener* create_evlistener(ListenHandler *handler, int family)
addrinfo *res, *rp; addrinfo *res, *rp;
r = getaddrinfo(get_config()->host, service, &hints, &res); r = getaddrinfo(get_config()->host, service, &hints, &res);
if(r != 0) { if(r != 0) {
LOG(INFO) << "Unable to get address for " << get_config()->host << ": " LOG(INFO) << "Unable to get IPv" << (family == AF_INET ? "4" : "6")
<< " address for " << get_config()->host << ": "
<< gai_strerror(r); << gai_strerror(r);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment