From e51f24e36c1f84bc995a690d385c506c35cc6175 Mon Sep 17 00:00:00 2001 From: lgandx Date: Sat, 6 Jan 2024 13:48:41 -0300 Subject: [PATCH] fixed minor bug --- utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 521fb64..0f7fdde 100644 --- a/utils.py +++ b/utils.py @@ -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