Fixed a possible race condition in Transport startup when a local shared instance was restarted and client apps reconnect

pull/76/head
Mark Qvist 2022-04-17 19:34:12 +02:00
rodzic 5f36c8601f
commit cc0c01661d
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -121,6 +121,7 @@ class Transport:
@staticmethod
def start(reticulum_instance):
Transport.jobs_running = True
Transport.owner = reticulum_instance
if Transport.identity == None:
@ -155,6 +156,7 @@ class Transport:
Transport.control_destinations.append(Transport.tunnel_synthesize_handler)
Transport.control_hashes.append(Transport.tunnel_synthesize_destination.hash)
Transport.jobs_running = False
thread = threading.Thread(target=Transport.jobloop)
thread.setDaemon(True)
thread.start()