Improved startup time for instances and programs connected to a shared instance

This commit is contained in:
Mark Qvist 2022-11-24 13:28:22 +01:00
parent 1e477c976c
commit 680d17fb98
1 changed files with 38 additions and 36 deletions

View File

@ -144,6 +144,7 @@ class Transport:
RNS.log("Loaded Transport Identity from storage", RNS.LOG_VERBOSE)
packet_hashlist_path = RNS.Reticulum.storagepath+"/packet_hashlist"
if not Transport.owner.is_connected_to_shared_instance:
if os.path.isfile(packet_hashlist_path):
try:
file = open(packet_hashlist_path, "rb")
@ -2081,6 +2082,7 @@ class Transport:
@staticmethod
def save_packet_hashlist():
if not Transport.owner.is_connected_to_shared_instance:
if hasattr(Transport, "saving_packet_hashlist"):
wait_interval = 0.2
wait_timeout = 5