summaryrefslogtreecommitdiffstats
path: root/src/bp_sim.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bp_sim.cpp')
-rwxr-xr-xsrc/bp_sim.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp
index 2732548c..2c122e72 100755
--- a/src/bp_sim.cpp
+++ b/src/bp_sim.cpp
@@ -3652,10 +3652,15 @@ int CNodeGenerator::flush_file(dsec_t max_time,
if ( unlikely( node_sl->is_mask_for_free() ) ) {
thread->free_node(node);
} else {
- node_sl->handle(thread);
+ /* count before handle - node might be destroyed */
#ifdef TREX_SIM
update_stl_stats(node_sl);
+ #endif
+
+ node_sl->handle(thread);
+
+ #ifdef TREX_SIM
if (has_limit_reached()) {
thread->m_stateless_dp_info.stop_traffic(node_sl->get_port_id(), false, 0);
}