1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

LibCore: Exit EventLoop::spin_until() when exit requested

This keeps WebContent from staying open if it's spinning forever trying
to load a page.
This commit is contained in:
Peter Elliott 2023-07-11 16:56:28 -06:00 committed by Andreas Kling
parent dc5d85b609
commit da96c151ab

View file

@ -78,7 +78,7 @@ int EventLoop::exec()
void EventLoop::spin_until(Function<bool()> goal_condition)
{
EventLoopPusher pusher(*this);
while (!goal_condition())
while (!m_impl->was_exit_requested() && !goal_condition())
pump();
}