Fix for b/28669072 factory status not always visible.
The AI_ADDRCONFIG makes it so we don't bind unless there is
an address configured, this breaks the factory status because
cwmpd is starting before dhclient4 has received an address.
Change-Id: I50b9fecc1ec168e53672b4eaf2769d40ee884728
diff --git a/tornado/netutil.py b/tornado/netutil.py
index d06a176..a33a3e4 100644
--- a/tornado/netutil.py
+++ b/tornado/netutil.py
@@ -241,12 +241,7 @@
if address == "":
address = 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