Added periodic data persistence for shared and standalone instances

This commit is contained in:
Mark Qvist 2022-09-13 20:17:25 +02:00
parent 9775893840
commit 75e32af1c5
3 changed files with 43 additions and 22 deletions

View file

@ -2240,9 +2240,13 @@ class Transport:
Transport.saving_tunnel_table = False
@staticmethod
def persist_data():
Transport.save_packet_hashlist()
Transport.save_path_table()
Transport.save_tunnel_table()
@staticmethod
def exit_handler():
Transport.save_packet_hashlist()
Transport.save_path_table()
Transport.save_tunnel_table()
if not Transport.owner.is_connected_to_shared_instance:
Transport.persist_data()