0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 21:53:54 +01:00

dont handle ctrlc in web

This commit is contained in:
2025-12-06 23:27:46 +01:00
parent c1ff179498
commit b8201f53d2

View File

@@ -1,5 +1,5 @@
import multiprocessing import multiprocessing
import json import json, signal
import threading, uuid, time import threading, uuid, time
from functools import partial from functools import partial
from http.server import BaseHTTPRequestHandler, HTTPServer from http.server import BaseHTTPRequestHandler, HTTPServer
@@ -93,8 +93,9 @@ class APIHandler(BaseHTTPRequestHandler):
self.send_header('Date', self.date_time_string()) self.send_header('Date', self.date_time_string())
def web_server_process(data, imc_q): def web_server_process(data, imc_q):
try: ThreadingHTTPServer(("0.0.0.0", 3001), partial(APIHandler, data, imc_q)).serve_forever() def signal_handler(sig, frame): pass
except KeyboardInterrupt: pass signal.signal(signal.SIGINT, signal_handler)
ThreadingHTTPServer(("0.0.0.0", 3001), partial(APIHandler, data, imc_q)).serve_forever()
class Module(PlayerModule): class Module(PlayerModule):
def __init__(self): def __init__(self):