Fixed missing check for dict entry existence

This commit is contained in:
Mark Qvist 2025-01-10 12:40:11 +01:00
parent c668a51e39
commit 1e1b9dc79e

View File

@ -1397,7 +1397,8 @@ class Transport:
now = time.time()
if now < announce_entry[1]:
RNS.log("Rebroadcasted announce for "+RNS.prettyhexrep(packet.destination_hash)+" has been passed on to another node, no further tries needed", RNS.LOG_DEBUG)
Transport.announce_table.pop(packet.destination_hash)
if packet.destination_hash in Transport.announce_table:
Transport.announce_table.pop(packet.destination_hash)
else:
received_from = packet.destination_hash