From: Philipp Hagemeister Date: Tue, 4 Sep 2012 10:34:00 +0000 (+0200) Subject: Do not set AI_ADDRCONFIG in netutil.bind_sockets X-Git-Tag: v3.0.0~272^2~28^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=587ef5ee9c53e2b99458b1946d10b85efa4d54b0;p=thirdparty%2Ftornado.git Do not set AI_ADDRCONFIG in netutil.bind_sockets --- diff --git a/tornado/netutil.py b/tornado/netutil.py index 6c5a0a937..816ac70a4 100644 --- a/tornado/netutil.py +++ b/tornado/netutil.py @@ -261,12 +261,6 @@ def bind_sockets(port, address=None, family=socket.AF_UNSPEC, backlog=128, flags address = None if flags is None: flags = socket.AI_PASSIVE - if hasattr(socket, "AI_ADDRCONFIG"): - # AI_ADDRCONFIG ensures that we only try to bind on ipv6 - # if the system is configured for it, but the flag doesn't - # exist on some platforms (specifically WinXP, although - # newer versions of windows have it) - flags |= socket.AI_ADDRCONFIG for res in set(socket.getaddrinfo(address, port, family, socket.SOCK_STREAM, 0, flags)): af, socktype, proto, canonname, sockaddr = res