IPv4 listen socket fix

- on OpenBSD, you can't have a socket that supports both IPv4 and IPv6.
  This allows handling for this error, and then it will try IPv4 only,
  just like for other similar errors.
This commit is contained in:
Peter Šurda 2017-02-26 12:55:43 +01:00
parent 191650f5a4
commit 0fa0599cd4
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -91,7 +91,8 @@ class singleListener(threading.Thread, StoppableThread):
e.args[0] in (errno.EAFNOSUPPORT,
errno.EPFNOSUPPORT,
errno.EADDRNOTAVAIL,
errno.ENOPROTOOPT)):
errno.ENOPROTOOPT,
errno.EINVAL)):
sock = self._createListenSocket(socket.AF_INET)
else:
raise