Make boot_uuid change in event loops when it changes
We were seeing any event loops created before the UUID changes staying
the same. This defeats the purpose. This is especially true for the
simulated network bridge which uses an event loop to get the boot UUID,
and wants to observe when it changes.
The boot UUID shouldn't change in any other conditions, so this won't
have an effect on anything else.
Change-Id: Idfa8f36e8d0e4ba964d09bf2170cbbffb17b8276
diff --git a/aos/events/simulated_event_loop.cc b/aos/events/simulated_event_loop.cc
index f59fc23..e2aebb0 100644
--- a/aos/events/simulated_event_loop.cc
+++ b/aos/events/simulated_event_loop.cc
@@ -462,8 +462,7 @@
std::vector<std::pair<EventLoop *, std::function<void(bool)>>>
*raw_event_loops,
const Node *node, pid_t tid)
- : EventLoop(CHECK_NOTNULL(configuration),
- node_event_loop_factory->boot_uuid()),
+ : EventLoop(CHECK_NOTNULL(configuration)),
scheduler_(scheduler),
node_event_loop_factory_(node_event_loop_factory),
channels_(channels),
@@ -575,6 +574,10 @@
int NumberBuffers(const Channel *channel) override;
+ const UUID &boot_uuid() const override {
+ return node_event_loop_factory_->boot_uuid();
+ }
+
private:
friend class SimulatedTimerHandler;
friend class SimulatedPhasedLoopHandler;