From b161650ced1268f86abfc3a8cec9cd0f56ec76f0 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 2 Nov 2023 13:04:09 +0100 Subject: [PATCH] Adjusted link timings --- RNS/Reticulum.py | 2 +- RNS/Transport.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py index c7a6424..a764e43 100755 --- a/RNS/Reticulum.py +++ b/RNS/Reticulum.py @@ -1329,7 +1329,7 @@ class Reticulum: rpc_connection.send({"get": "first_hop_timeout", "destination_hash": destination}) response = rpc_connection.recv() - if self.is_connected_to_shared_instance and self._force_shared_instance_bitrate: + if self.is_connected_to_shared_instance and hasattr(self, "_force_shared_instance_bitrate") and self._force_shared_instance_bitrate: simulated_latency = ((1/self._force_shared_instance_bitrate)*8)*RNS.Reticulum.MTU RNS.log("Adding simulated latency of "+RNS.prettytime(simulated_latency)+" to first hop timeout", RNS.LOG_DEBUG) response += simulated_latency diff --git a/RNS/Transport.py b/RNS/Transport.py index 52457eb..7915773 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -2068,7 +2068,7 @@ class Transport: def first_hop_timeout(destination_hash): latency = Transport.next_hop_per_byte_latency(destination_hash) if latency != None: - return RNS.Reticulum.MTU * latency + return RNS.Reticulum.MTU * latency + RNS.Reticulum.DEFAULT_PER_HOP_TIMEOUT else: return RNS.Reticulum.DEFAULT_PER_HOP_TIMEOUT