fixed minor bug

This commit is contained in:
lgandx 2024-01-06 13:48:41 -03:00
parent fa297c8a16
commit e51f24e36c

View file

@ -221,10 +221,12 @@ def FindLocalIP(Iface, OURIP):
def Probe_IPv6_socket(): def Probe_IPv6_socket():
"""Return true is IPv6 sockets are really supported, and False when IPv6 is not supported.""" """Return true is IPv6 sockets are really supported, and False when IPv6 is not supported."""
if not socket.has_ipv6:
return False
try: try:
with socket.socket(socket.AF_INET6, socket.SOCK_STREAM) as s: with socket.socket(socket.AF_INET6, socket.SOCK_STREAM) as s:
s.bind(("::1", 0)) s.bind(("::1", 0))
return True return True
except: except:
return False return False