If multiple states are pending, it's possible for an image to
be closed while the state lock is unlocked during the callback.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
ActionContexts action_contexts(std::move(m_actions_contexts.front()));
m_actions_contexts.pop_front();
- m_state = next_state;
m_lock.Unlock();
for (auto ctx : action_contexts.second) {
}
m_lock.Lock();
+ m_state = next_state;
if (!is_transition_state() && !m_actions_contexts.empty()) {
execute_next_action();
}