From: Ben Darnell Date: Mon, 30 May 2011 00:27:48 +0000 (-0700) Subject: Add AI_ADDRCONFIG to getaddrinfo call, which may fix ipv6-related issues report on... X-Git-Tag: v2.0.0~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f09a4a92a90fa426140d700681012677ef1cfa09;p=thirdparty%2Ftornado.git Add AI_ADDRCONFIG to getaddrinfo call, which may fix ipv6-related issues report on the mailing list --- diff --git a/tornado/httpserver.py b/tornado/httpserver.py index 7e6e2fa70..05f43f465 100644 --- a/tornado/httpserver.py +++ b/tornado/httpserver.py @@ -182,7 +182,7 @@ class HTTPServer(object): address = None success = 0 for res in socket.getaddrinfo(address, port, family, socket.SOCK_STREAM, - 0, socket.AI_PASSIVE): + 0, socket.AI_PASSIVE | socket.AI_ADDRCONFIG): af, socktype, proto, canonname, sockaddr = res sock = socket.socket(af, socktype, proto) flags = fcntl.fcntl(sock.fileno(), fcntl.F_GETFD)