mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-03 07:34:53 +00:00
refactor(userspace/engine): make stats manager thread-safe for on_event method
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
@@ -194,6 +194,15 @@ std::unique_ptr<load_result> falco_engine::load_rules(const std::string &rules_c
|
||||
m_rule_loader.compile(cfg, m_rules);
|
||||
}
|
||||
|
||||
if (cfg.res->successful())
|
||||
{
|
||||
m_rule_stats_manager.clear();
|
||||
for (const auto &r : m_rules)
|
||||
{
|
||||
m_rule_stats_manager.on_rule_loaded(r);
|
||||
}
|
||||
}
|
||||
|
||||
return std::move(cfg.res);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user