Fixed regression in TCPInterface client spawner.

This commit is contained in:
Mark Qvist 2021-09-24 14:11:04 +02:00
parent e9e2ffbe0d
commit 16dae81844

View File

@ -70,7 +70,7 @@ class TCPClientInterface(Interface):
if not self.connect(initial=True): if not self.connect(initial=True):
thread = threading.Thread(target=self.reconnect) thread = threading.Thread(target=self.reconnect)
thread.setDaemon(False) thread.setDaemon(True)
thread.start() thread.start()
else: else:
thread = threading.Thread(target=self.read_loop) thread = threading.Thread(target=self.read_loop)
@ -292,6 +292,7 @@ class TCPServerInterface(Interface):
spawned_interface.target_ip = handler.client_address[0] spawned_interface.target_ip = handler.client_address[0]
spawned_interface.target_port = str(handler.client_address[1]) spawned_interface.target_port = str(handler.client_address[1])
spawned_interface.parent_interface = self spawned_interface.parent_interface = self
spawned_interface.online = True
RNS.log("Spawned new TCPClient Interface: "+str(spawned_interface), RNS.LOG_VERBOSE) RNS.log("Spawned new TCPClient Interface: "+str(spawned_interface), RNS.LOG_VERBOSE)
RNS.Transport.interfaces.append(spawned_interface) RNS.Transport.interfaces.append(spawned_interface)
spawned_interface.read_loop() spawned_interface.read_loop()