From a732767a2845a080fdc49a620f5cfdd6c7ef4023 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 25 Sep 2023 14:17:58 +0200 Subject: [PATCH] Fixed local RSSI and SNR cache pop order --- RNS/Transport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RNS/Transport.py b/RNS/Transport.py index 5cd4ed4..3f28838 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -1049,7 +1049,7 @@ class Transport: Transport.local_client_rssi_cache.append([packet.packet_hash, packet.rssi]) while len(Transport.local_client_rssi_cache) > Transport.LOCAL_CLIENT_CACHE_MAXSIZE: - Transport.local_client_rssi_cache.pop() + Transport.local_client_rssi_cache.pop(0) if hasattr(interface, "r_stat_snr"): if interface.r_stat_rssi != None: @@ -1058,7 +1058,7 @@ class Transport: Transport.local_client_snr_cache.append([packet.packet_hash, packet.snr]) while len(Transport.local_client_snr_cache) > Transport.LOCAL_CLIENT_CACHE_MAXSIZE: - Transport.local_client_snr_cache.pop() + Transport.local_client_snr_cache.pop(0) if len(Transport.local_client_interfaces) > 0: if Transport.is_local_client_interface(interface):