mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 21:50:18 +00:00
Fixed unclosed socket in AutoInterface
This commit is contained in:
parent
a776d59f03
commit
26dae3830e
@ -295,6 +295,7 @@ class AutoInterface(Interface):
|
|||||||
ifis = struct.pack("I", socket.if_nametoindex(ifname))
|
ifis = struct.pack("I", socket.if_nametoindex(ifname))
|
||||||
announce_socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_IF, ifis)
|
announce_socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_IF, ifis)
|
||||||
announce_socket.sendto(discovery_token, addr_info[0][4])
|
announce_socket.sendto(discovery_token, addr_info[0][4])
|
||||||
|
announce_socket.close()
|
||||||
except Exception as e:
|
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:
|
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)
|
RNS.log(str(self)+" Detected possible carrier loss on "+str(ifname)+": "+str(e), RNS.LOG_WARNING)
|
||||||
|
Loading…
Reference in New Issue
Block a user