From 4cc6711551ce02a258428d0e950e55569ea6384e Mon Sep 17 00:00:00 2001 From: DevilXD Date: Fri, 3 Dec 2021 21:22:25 +0100 Subject: [PATCH] Remove clean exit handler on fatal errors --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index b79a4d1..094546d 100644 --- a/main.py +++ b/main.py @@ -120,6 +120,8 @@ except (asyncio.CancelledError, KeyboardInterrupt): # notify we're free to exit close_event.set() except Exception: + # Remove the handler so it doesn't delay exit + win32api.SetConsoleCtrlHandler(clean_exit, False) print("Fatal error encountered:\n") traceback.print_exc() terminate()