Added recovery to local shared interfaces if master RNS instance is restarted

This commit is contained in:
Mark Qvist 2021-12-10 18:32:24 +01:00
parent e1e31692d7
commit df39cff520
5 changed files with 82 additions and 22 deletions

View file

@ -1490,6 +1490,31 @@ class Transport:
interface.detach()
@staticmethod
def shared_connection_disappeared():
for link in Transport.active_links:
link.teardown()
for link in Transport.pending_links:
link.teardown()
Transport.announce_table = {}
Transport.destination_table = {}
Transport.reverse_table = {}
Transport.link_table = {}
Transport.held_announces = {}
Transport.announce_handlers = []
Transport.tunnels = {}
@staticmethod
def shared_connection_reappeared():
if Transport.owner.is_connected_to_shared_instance:
for registered_destination in Transport.destinations:
if registered_destination.type == RNS.Destination.SINGLE:
registered_destination.announce(path_response=True)
@staticmethod
def exit_handler():
try: