From cc0c01661de8c056411b2178e2145f8d90e86d34 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sun, 17 Apr 2022 19:34:12 +0200 Subject: [PATCH] Fixed a possible race condition in Transport startup when a local shared instance was restarted and client apps reconnect --- RNS/Transport.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RNS/Transport.py b/RNS/Transport.py index e0fdf75..25a3b89 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -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()