From 1e4b1fb6fb5f0631bac3c8d9fe907334013d0f4a Mon Sep 17 00:00:00 2001 From: Mike Langmayr <1809691+mikelangmayr@users.noreply.github.com> Date: Thu, 15 Oct 2026 11:42:19 -0700 Subject: [PATCH] Initialise the exposure mode producer and consumer flags --- camerad/exposure_modes.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/camerad/exposure_modes.h b/camerad/exposure_modes.h index ecf7735..eddee19 100644 --- a/camerad/exposure_modes.h +++ b/camerad/exposure_modes.h @@ -33,9 +33,12 @@ namespace Camera { std::mutex queue_mutex; ///< mutex protects access to the queue std::condition_variable queue_cv; ///< notify when the queue has new data - std::atomic is_producer_finished; - std::atomic is_producer_error; - std::atomic is_consumer_error; + // Read before a session sets them, by the reap at the start of the next + // one, so an indeterminate value surfaces as a failure that never + // happened: an abort that worked reports "abort failed" + std::atomic is_producer_finished{false}; + std::atomic is_producer_error{false}; + std::atomic is_consumer_error{false}; std::string get_type() { return this->type; } std::vector get_args() { return this->args; }