Fixup a1810bde32 (better comment)

[ci skip]
This commit is contained in:
Charles Dang 2018-04-11 17:40:58 +11:00
parent 1068ca128c
commit 4b6e5478be

View file

@ -139,12 +139,12 @@ void manager::write_events(config& cfg) const
continue; continue;
} }
// This function may be invoked mid-event, such as via [inspect] (the inspector writes // Silently skip disabled events if this function is invoked mid-event, such as via
// the events to a local config) or if an out-of-sync error happens in MP. In that case, // [inspect] (the inspector writes the events to a local config) or if an out-of-sync
// it's possible for the currently running event is already disabled. That would happen // error occurs in MP. If the event in question is first-time-only, it will already
// if it's a first-time-only event; those are disabled before their actions are run. In // have been flagged as disabled by this point (such events are disabled before their
// that case, skip disabled events. If invoked from outside an event, however, there // actions are run). If a disabled event is encountered outside an event context,
// should be no disabled events in the list, so assert if one is found. // however, assert. That means something when wrong with event list cleanup.
if(eh->disabled() && is_event_running()) { if(eh->disabled() && is_event_running()) {
continue; continue;
} else { } else {