From 7be7beec4269ce53b6d695a3a1a2c14786c79793 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Thu, 2 Apr 2020 17:33:38 -0700 Subject: [PATCH] updated core-daemon thread usage to use thread daemon param --- daemon/scripts/core-daemon | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/daemon/scripts/core-daemon b/daemon/scripts/core-daemon index 866c5472..9f738467 100755 --- a/daemon/scripts/core-daemon +++ b/daemon/scripts/core-daemon @@ -41,8 +41,7 @@ def start_udp(mainserver, server_address): :return: CoreUdpServer """ mainserver.udpserver = CoreUdpServer(server_address, CoreUdpHandler, mainserver) - mainserver.udpthread = threading.Thread(target=mainserver.udpserver.start) - mainserver.udpthread.daemon = True + mainserver.udpthread = threading.Thread(target=mainserver.udpserver.start, daemon=True) mainserver.udpthread.start() @@ -70,8 +69,7 @@ def cored(cfg): address_config = cfg["grpcaddress"] port_config = cfg["grpcport"] grpc_address = f"{address_config}:{port_config}" - grpc_thread = threading.Thread(target=grpc_server.listen, args=(grpc_address,)) - grpc_thread.daemon = True + grpc_thread = threading.Thread(target=grpc_server.listen, args=(grpc_address,), daemon=True) grpc_thread.start() # start udp server