From 26dae3830eed64b46f2c8d4d3e0ee9a246c4134b Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 9 Jun 2022 08:48:55 +0200 Subject: [PATCH] Fixed unclosed socket in AutoInterface --- RNS/Interfaces/AutoInterface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/RNS/Interfaces/AutoInterface.py b/RNS/Interfaces/AutoInterface.py index fc7bcee..96d54e3 100644 --- a/RNS/Interfaces/AutoInterface.py +++ b/RNS/Interfaces/AutoInterface.py @@ -295,6 +295,7 @@ class AutoInterface(Interface): ifis = struct.pack("I", socket.if_nametoindex(ifname)) announce_socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_IF, ifis) announce_socket.sendto(discovery_token, addr_info[0][4]) + announce_socket.close() except Exception as e: if (ifname in self.timed_out_interfaces and self.timed_out_interfaces[ifname] == False) or not ifname in self.timed_out_interfaces: RNS.log(str(self)+" Detected possible carrier loss on "+str(ifname)+": "+str(e), RNS.LOG_WARNING)