Better thread configuration

This commit is contained in:
Mark Qvist 2025-01-19 00:57:36 +01:00
parent d2cf3c2a7e
commit 3e7ab5136e
2 changed files with 2 additions and 1 deletions

View File

@ -319,6 +319,7 @@ class LocalServerInterface(Interface):
address = (self.bind_ip, self.bind_port)
self.server = ThreadingTCPServer(address, handlerFactory(self.incoming_connection))
self.server.daemon_threads = True
thread = threading.Thread(target=self.server.serve_forever)
thread.daemon = True

View File

@ -2690,7 +2690,7 @@ class Transport:
def detach_job():
RNS.log(f"Detaching {interface}", RNS.LOG_EXTREME)
interface.detach()
dt = threading.Thread(target=detach_job, daemon=True)
dt = threading.Thread(target=detach_job, daemon=False)
dt.start()
detach_threads.append(dt)