void NetworkAction::set_state(Action::State state)
{
+ Action::State previous = get_state();
Action::set_state(state);
- s4u::Link::on_communication_state_change(this);
+ if (previous != state) // Trigger only if the state changed
+ s4u::Link::on_communication_state_change(this);
}
/** @brief returns a list of all Links that this action is using */