I've seen hypridle hang a couple times after logging:
hypridle[74745]: [CRITICAL] [core] Disconnected from pollfd id 1
It usually takes a few minutes to finally exit but the last occurrence hung for almost 10 hours before I noticed and manually restarted it.
Would it be better to change the while loops in enterEventLoop to while (!m_bTerminate), remove the exit(1) and then if (m_bTerminate) { exit(1); } after the loops?