From 8e4a1e3ffaedcfef74aadcd563439dbd6f2e310a Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 20 Sep 2023 00:53:51 +0200 Subject: [PATCH] Increased AutoInterface peering timeout on Android --- RNS/Interfaces/AutoInterface.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RNS/Interfaces/AutoInterface.py b/RNS/Interfaces/AutoInterface.py index 12e0efe..5405571 100644 --- a/RNS/Interfaces/AutoInterface.py +++ b/RNS/Interfaces/AutoInterface.py @@ -105,6 +105,11 @@ class AutoInterface(Interface): self.peering_timeout = AutoInterface.PEERING_TIMEOUT self.multicast_echo_timeout = AutoInterface.PEERING_TIMEOUT/2 + # Increase peering timeout on Android, due to potential + # low-power modes implemented on many chipsets. + if RNS.vendor.platformutils.is_android(): + self.peering_timeout *= 3 + if allowed_interfaces == None: self.allowed_interfaces = [] else: