From 9170eebd4ee200928254286b920d68b28c0cac99 Mon Sep 17 00:00:00 2001 From: templeofshadow Date: Thu, 25 Jun 2026 15:37:42 -0500 Subject: [PATCH] fix attempt 2 of the terminate check stopping the mainloop --- main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.lua b/main.lua index 546bb18..07d03dc 100644 --- a/main.lua +++ b/main.lua @@ -780,7 +780,9 @@ function Main() event = os.pullEventRaw("terminate") end - parallel.waitForAny(os.sleep(0.1), getTerminateEvent) + local function do_sleep() os.sleep(0.1) end + + parallel.waitForAny(do_sleep, getTerminateEvent) if event == "terminate" then print("Terminate Event Received") break end end