Skip to content

Commit e22a802

Browse files
committed
Copy on known destinations persist
1 parent 111c9c0 commit e22a802

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

RNS/Identity.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ def save_known_destinations():
187187
with open(RNS.Reticulum.storagepath+"/known_destinations","rb") as file:
188188
storage_known_destinations = umsgpack.load(file)
189189

190-
except:
191-
pass
190+
except: pass
192191

193192
try:
194193
for destination_hash in storage_known_destinations:
@@ -199,8 +198,7 @@ def save_known_destinations():
199198

200199
RNS.log("Saving "+str(len(Identity.known_destinations))+" known destinations to storage...", RNS.LOG_DEBUG)
201200
with open(RNS.Reticulum.storagepath+"/known_destinations","wb") as file:
202-
umsgpack.dump(Identity.known_destinations, file)
203-
201+
umsgpack.dump(Identity.known_destinations.copy(), file)
204202

205203
save_time = time.time() - save_start
206204
if save_time < 1:

0 commit comments

Comments
 (0)