- simgrid::s4u::Link::on_communicate.connect([this](const kernel::resource::NetworkAction& act) {
- if ((get_host() == &act.get_src() || get_host() == &act.get_dst()) && iteration_running) {
+ kernel::activity::CommImpl::on_start.connect([this](const kernel::activity::CommImpl& comm) {
+ const auto* act = static_cast<kernel::resource::NetworkAction*>(comm.model_action_);
+ if ((get_host() == &act->get_src() || get_host() == &act->get_dst()) && iteration_running) {