0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-27 06:03:52 +01:00

make it safer

This commit is contained in:
Kuba
2025-10-31 18:26:23 +01:00
parent 68a843d5a2
commit ad05b2076c

View File

@@ -44,6 +44,7 @@ logger = log95.log95("radioPlayer", logger_level)
exit_pending = False
intr_time = 0
exit_lock = threading.Lock()
@dataclass
class Process:
@@ -105,6 +106,7 @@ procman = ProcessManager()
def handle_sigint(signum, frame):
global exit_pending, intr_time
with exit_lock:
logger.info("Received SIGINT")
if (time.time() - intr_time) > 5:
intr_time = time.time()