mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Sumstats: epoch_finished was not called under certain circumstances
In non-clustered mode, epoch_finished was not called when there was no data during the epoch. This behavior does not fit the documentation, and also is different in cluster-mode, where epoch_finished is, indeed, called after every epoch. This small change fixes this behavior.
This commit is contained in:
parent
50a49eabb5
commit
8ffbc69a4d
1 changed files with 8 additions and 2 deletions
|
@ -43,9 +43,15 @@ event SumStats::finish_epoch(ss: SumStat)
|
||||||
if ( ss?$epoch_finished )
|
if ( ss?$epoch_finished )
|
||||||
ss$epoch_finished(now);
|
ss$epoch_finished(now);
|
||||||
}
|
}
|
||||||
else if ( |data| > 0 )
|
else
|
||||||
{
|
{
|
||||||
|
if ( |data| > 0 )
|
||||||
event SumStats::process_epoch_result(ss, now, copy(data));
|
event SumStats::process_epoch_result(ss, now, copy(data));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( ss?$epoch_finished )
|
||||||
|
ss$epoch_finished(now);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue