Revert "IPv6 start error. fix #306"

This reverts commit 85cb9be064.
This commit is contained in:
Ruud
2012-05-20 12:25:34 +02:00
parent 85cb9be064
commit cba9916932
+1 -3
View File
@@ -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