From 587ef5ee9c53e2b99458b1946d10b85efa4d54b0 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Tue, 4 Sep 2012 12:34:00 +0200 Subject: [PATCH] Do not set AI_ADDRCONFIG in netutil.bind_sockets --- tornado/netutil.py | 6 ------ 1 file changed, 6 deletions(-) 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 -- 2.47.2