Skip to content
Snippets Groups Projects
Commit 1ea5f565 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Merge branch 'master' into coio-fiber-detach

parents dde1648e 6d07d1c0
No related branches found
No related tags found
No related merge requests found
...@@ -218,9 +218,21 @@ getaddrinfo_cb(va_list ap) ...@@ -218,9 +218,21 @@ getaddrinfo_cb(va_list ap)
{ {
const char *host = va_arg(ap, const char *); const char *host = va_arg(ap, const char *);
const char *port = va_arg(ap, const char *); const char *port = va_arg(ap, const char *);
const struct addrinfo *hints = va_arg(ap, const struct addrinfo *); struct addrinfo *hints = va_arg(ap, struct addrinfo *);
struct addrinfo **res = va_arg(ap, struct addrinfo **); struct addrinfo **res = va_arg(ap, struct addrinfo **);
if (getaddrinfo(host, port, hints, res)) {
int rc = getaddrinfo(host, port, hints, res);
/* getaddrinfo can return EAI_ADDRFAMILY on attempt
* to resolve ::1, if machine has no public ipv6 addresses
* configured. Retry without AI_ADDRCONFIG flag set.
*
* See for details: https://bugs.launchpad.net/tarantool/+bug/1160877
*/
if (rc == EAI_ADDRFAMILY || rc == EAI_BADFLAGS) {
hints->ai_flags &= ~AI_ADDRCONFIG;
rc = getaddrinfo(host, port, hints, res);
}
if (rc) {
errno = ERESOLVE; errno = ERESOLVE;
return -1; return -1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment