Commit c013386e authored by Brian May's avatar Brian May

If IPv4 bind but IPv6 succeeds don't error.

parent a33f6199
......@@ -209,7 +209,15 @@ class MultiListener:
if self.v6:
self.v6.listen(backlog)
if self.v4:
self.v4.listen(backlog)
try:
self.v4.listen(backlog)
except socket.error, e:
# on some systems v4 bind will fail if the v6 suceeded,
# in this case the v6 socket will receive v4 too.
if e.errno == errno.EADDRINUSE and self.v6:
self.v4 = None
else:
raise e
def bind(self, address_v6, address_v4):
if address_v6 and self.v6:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment