From b27c03c1c464f10828335db91db154dc3a95b809 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sat, 9 Jan 2021 20:08:40 +0100 Subject: [PATCH] restore autostart to avoid unused thread --- owrx/cpu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/owrx/cpu.py b/owrx/cpu.py index bff3f42..cad912f 100644 --- a/owrx/cpu.py +++ b/owrx/cpu.py @@ -23,7 +23,6 @@ class CpuUsageThread(threading.Thread): self.last_idletime = 0 self.endEvent = threading.Event() super().__init__() - self.start() def run(self): logger.debug("cpu usage thread starting up") @@ -60,6 +59,8 @@ class CpuUsageThread(threading.Thread): def add_client(self, c): self.clients.append(c) + if not self.is_alive(): + self.start() def remove_client(self, c): try: