From cba99169328376ab23e6b55cbc7fca70c95347c3 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 20 May 2012 12:25:34 +0200 Subject: [PATCH] Revert "IPv6 start error. fix #306" This reverts commit 85cb9be0640050c0ef88d52ad8579393ced1b673. --- libs/tornado/netutil.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/tornado/netutil.py b/libs/tornado/netutil.py index 290f33db..1e1bcbf9 100644 --- a/libs/tornado/netutil.py +++ b/libs/tornado/netutil.py @@ -238,14 +238,12 @@ def bind_sockets(port, address=None, family=socket.AF_UNSPEC, backlog=128): if address == "": address = None flags = socket.AI_PASSIVE - try: + 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 - except: - pass for res in set(socket.getaddrinfo(address, port, family, socket.SOCK_STREAM, 0, flags)): af, socktype, proto, canonname, sockaddr = res