Break Logger recursion
There are some cases where folks are using the on_logged_period to
rotate and stop the logger. When they stop the logger, that triggers
the on_logged_period callback to be called again, potentially ending in
an infintate recursion.
Fix that by blocking the callback when flushing at shutdown.
Change-Id: I442b4f5a9d29d996db3e450bd4f652e33ac7feda
diff --git a/aos/events/logging/log_writer.h b/aos/events/logging/log_writer.h
index 992633a..675e113 100644
--- a/aos/events/logging/log_writer.h
+++ b/aos/events/logging/log_writer.h
@@ -243,7 +243,8 @@
aos::monotonic_clock::time_point monotonic_start_time,
aos::realtime_clock::time_point realtime_start_time);
- void DoLogData(const monotonic_clock::time_point end_time);
+ void DoLogData(const monotonic_clock::time_point end_time,
+ bool run_on_logged);
void WriteMissingTimestamps();