From f889c4dc68e1f1ae43da46f1ade9bc27e470cb92 Mon Sep 17 00:00:00 2001 From: ramforth Date: Fri, 31 Oct 2025 09:59:48 +0100 Subject: [PATCH] fix: Handle KeyboardInterrupt gracefully in server.py --- system_monitor_overlay/server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system_monitor_overlay/server.py b/system_monitor_overlay/server.py index e4b176e..6fe5c30 100644 --- a/system_monitor_overlay/server.py +++ b/system_monitor_overlay/server.py @@ -22,4 +22,8 @@ class SystemInfoHandler(http.server.SimpleHTTPRequestHandler): with socketserver.TCPServer(('', PORT), SystemInfoHandler) as httpd: print("serving at port", PORT) + try: httpd.serve_forever() +except KeyboardInterrupt: + print("\nShutting down server.") + httpd.shutdown()