From 937423dbcfccd121c461f8f0ea533963c07ff861 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 2 Aug 2021 20:21:50 +0200 Subject: [PATCH] event/Loop: check the `quit` flag after RunDeferred() Allow DeferredEvents to call EventLoop::Break(). --- src/event/Loop.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx index 729aa0c41..630b7fb8b 100644 --- a/src/event/Loop.cxx +++ b/src/event/Loop.cxx @@ -298,6 +298,8 @@ EventLoop::Run() noexcept break; RunDeferred(); + if (quit) + break; if (RunOneIdle()) /* check for other new events after each