@@ -377,6 +377,7 @@ def outbound(packet):
377
377
# just the relevant interface if the packet has an attached
378
378
# interface, or belongs to a link.
379
379
else :
380
+ stored_hash = False
380
381
for interface in Transport .interfaces :
381
382
if interface .OUT :
382
383
should_transmit = True
@@ -391,8 +392,10 @@ def outbound(packet):
391
392
if should_transmit :
392
393
RNS .log ("Transmitting " + str (len (packet .raw ))+ " bytes on: " + str (interface ), RNS .LOG_EXTREME )
393
394
RNS .log ("Hash is " + RNS .prettyhexrep (packet .packet_hash ), RNS .LOG_EXTREME )
394
- if not packet .packet_hash in Transport .packet_hashlist :
395
+
396
+ if not stored_hash :
395
397
Transport .packet_hashlist .append (packet .packet_hash )
398
+
396
399
interface .processOutgoing (packet .raw )
397
400
sent = True
398
401
@@ -1140,13 +1143,17 @@ def interface_to_shared_instance(interface):
1140
1143
1141
1144
@staticmethod
1142
1145
def exit_handler ():
1143
- RNS .log ("Saving packet hashlist to storage..." , RNS .LOG_VERBOSE )
1144
1146
try :
1147
+ if not RNS .Reticulum .transport_enabled ():
1148
+ Transport .packet_hashlist = []
1149
+ else :
1150
+ RNS .log ("Saving packet hashlist to storage..." , RNS .LOG_VERBOSE )
1151
+
1145
1152
packet_hashlist_path = RNS .Reticulum .storagepath + "/packet_hashlist"
1146
1153
file = open (packet_hashlist_path , "wb" )
1147
1154
file .write (umsgpack .packb (Transport .packet_hashlist ))
1148
1155
file .close ()
1149
- RNS . log ( "Done packet hashlist to storage" , RNS . LOG_VERBOSE )
1156
+
1150
1157
except Exception as e :
1151
1158
RNS .log ("Could not save packet hashlist to storage, the contained exception was: " + str (e ), RNS .LOG_ERROR )
1152
1159
0 commit comments