From f8272793b43e1c16013274ccd87d8c7b6f86eee4 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 25 Feb 2022 20:29:47 +0100 Subject: [PATCH] Tuned AutoInterface timeouts --- RNS/Interfaces/AutoInterface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RNS/Interfaces/AutoInterface.py b/RNS/Interfaces/AutoInterface.py index c9e3450..b78822c 100644 --- a/RNS/Interfaces/AutoInterface.py +++ b/RNS/Interfaces/AutoInterface.py @@ -19,7 +19,7 @@ class AutoInterface(Interface): SCOPE_ORGANISATION = "8" SCOPE_GLOBAL = "e" - PEERING_TIMEOUT = 6.0 + PEERING_TIMEOUT = 7.5 DARWIN_IGNORE_IFS = ["awdl0", "llw0", "lo0", "en5"] ANDROID_IGNORE_IFS = ["dummy0", "lo", "tun0"] @@ -48,10 +48,10 @@ class AutoInterface(Interface): self.outbound_udp_socket = None - self.announce_interval = AutoInterface.PEERING_TIMEOUT/4.0 + self.announce_interval = AutoInterface.PEERING_TIMEOUT/5.0 self.peer_job_interval = AutoInterface.PEERING_TIMEOUT*1.1 self.peering_timeout = AutoInterface.PEERING_TIMEOUT - self.multicast_echo_timeout = AutoInterface.PEERING_TIMEOUT + self.multicast_echo_timeout = AutoInterface.PEERING_TIMEOUT/2 if allowed_interfaces == None: self.allowed_interfaces = [] @@ -278,7 +278,7 @@ class AutoInterface(Interface): if ifname != None: self.multicast_echoes[ifname] = time.time() else: - RNS.log("Received multicast echo on unexpected interface", RNS.LOG_WARNING) + RNS.log(str(self)+" received multicast echo on unexpected interface "+str(ifname), RNS.LOG_WARNING) else: if not addr in self.peers: