From 771553e5f186e898eafc6f77727d1984b7732346 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 17 Dec 2024 08:31:06 -0600 Subject: [PATCH] Only call stop_executor_cb once on signal --- application_base.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application_base.cpp b/application_base.cpp index 3c42df8..18dd286 100644 --- a/application_base.cpp +++ b/application_base.cpp @@ -483,8 +483,9 @@ void application_base::destroy_plugins() { } void application_base::quit() { - my->_is_quiting = true; - stop_executor_cb(); + const bool already_quitting = my->_is_quiting.exchange(true); + if (!already_quitting) + stop_executor_cb(); } bool application_base::is_quiting() const {