fix(process_events): check the return value of open_live_inspector

Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
This commit is contained in:
Andrea Terzolo
2022-09-20 15:07:59 +00:00
committed by poiana
parent f57c67cc96
commit c0c37d87f5

View File

@@ -335,7 +335,12 @@ application::run_result application::process_events()
try
{
falco_logger::log(LOG_DEBUG, "Opening event source '" + source + "'\n");
open_live_inspector(src_info->inspector, source);
res = open_live_inspector(src_info->inspector, source);
if (!res.success)
{
return res;
}
if (m_state->enabled_sources.size() == 1)
{
// optimization: with only one source we don't spawn additional threads