mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Now the standalone sumstats works even if Bro is shutting down by blocking.
This commit is contained in:
parent
af36915186
commit
a07a40dc86
2 changed files with 15 additions and 4 deletions
|
@ -37,9 +37,21 @@ event SumStats::finish_epoch(ss: SumStat)
|
|||
if ( ss?$epoch_result )
|
||||
{
|
||||
local data = result_store[ss$name];
|
||||
event SumStats::process_epoch_result(ss, network_time(), data);
|
||||
}
|
||||
local now = network_time();
|
||||
if ( bro_is_terminating() )
|
||||
{
|
||||
for ( key in data )
|
||||
ss$epoch_result(now, key, data[key]);
|
||||
|
||||
if ( ss?$epoch_finished )
|
||||
ss$epoch_finished(now);
|
||||
}
|
||||
else
|
||||
{
|
||||
event SumStats::process_epoch_result(ss, now, data);
|
||||
}
|
||||
}
|
||||
|
||||
# We can reset here because we know that the reference
|
||||
# to the data will be maintained by the process_epoch_result
|
||||
# event.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue