Skip to content

Commit

Permalink
fixed minor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lgandx committed Jan 6, 2024
1 parent fa297c8 commit e51f24e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,12 @@ def FindLocalIP(Iface, OURIP):

def Probe_IPv6_socket():
"""Return true is IPv6 sockets are really supported, and False when IPv6 is not supported."""
if not socket.has_ipv6:
return False
try:
with socket.socket(socket.AF_INET6, socket.SOCK_STREAM) as s:
s.bind(("::1", 0))
return True
return True
except:
return False

Expand Down

0 comments on commit e51f24e

Please sign in to comment.