From de85a7570eb18e2c98fe739230adef46758068db Mon Sep 17 00:00:00 2001 From: getroot Date: Wed, 2 Oct 2024 17:26:13 +0900 Subject: [PATCH] Fixed an issue where the app would not stop --- src/projects/modules/managed_queue/managed_queue.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/projects/modules/managed_queue/managed_queue.h b/src/projects/modules/managed_queue/managed_queue.h index 53e90d62e..72723564e 100644 --- a/src/projects/modules/managed_queue/managed_queue.h +++ b/src/projects/modules/managed_queue/managed_queue.h @@ -188,9 +188,14 @@ namespace ov std::chrono::system_clock::time_point expire = (timeout == Infinite) ? std::chrono::system_clock::time_point::max() : std::chrono::system_clock::now() + std::chrono::milliseconds(timeout); auto result = _condition.wait_until(unique_lock, expire, [this]() -> bool { + if (_stop) + { + return true; + } + if (_buffering_delay == 0) { - return ((_size != 0 ) || _stop); + return (_size != 0); } else {