diff --git a/pytchat_listener.py b/pytchat_listener.py index be79732..653d08a 100644 --- a/pytchat_listener.py +++ b/pytchat_listener.py @@ -151,6 +151,10 @@ def main(): except Exception as e: console.print(f"[red]An error occurred: {e}[/red]") finally: + global _stop_input_thread + _stop_input_thread = True # Signal the input thread to stop + # input_thread.join() # Optionally wait for the input thread to finish, but daemon=True makes it optional + log_file.close() save_log = input(f"\nDo you want to save the chat log to {log_filename}? (y/n): ").lower() if save_log != 'y' and save_log != 'yes':