mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
restart: fix restart hook
This commit is contained in:
parent
06292524a1
commit
a0fd932ee2
1 changed files with 2 additions and 2 deletions
|
@ -66,13 +66,13 @@ public:
|
|||
|
||||
if (prev) {
|
||||
/* A wrap around of the sequence no should not be treated as a simulation restart */
|
||||
if (smp->sequence == 0 && prev->sequence != 0 && prev->sequence > UINT64_MAX - 16) {
|
||||
if (smp->sequence == 0 && prev->sequence != 0 && prev->sequence < UINT64_MAX - 16) {
|
||||
logger->warn("Simulation from node {} restarted (previous->sequence={}, current->sequence={})",
|
||||
node_name(node), prev->sequence, smp->sequence);
|
||||
|
||||
smp->flags |= SAMPLE_IS_FIRST;
|
||||
|
||||
/* Run restart hooks */
|
||||
/* Restart hooks */
|
||||
for (size_t i = 0; i < vlist_length(&node->in.hooks); i++) {
|
||||
Hook *k = (Hook *) vlist_at(&node->in.hooks, i);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue