fix(userspace/falco): properly handle termination at source opening failures

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
Jason Dellaluce 2022-10-11 15:48:16 +00:00 committed by poiana
parent 88c7202fdc
commit 5f2bc6a2d3

View File

@ -374,6 +374,7 @@ application::run_result application::process_events()
// note: we don't return here because we need to reach
// the thread termination loop below to make sure all
// already-spawned threads get terminated gracefully
ctx.finished->store(true, std::memory_order_seq_cst);
break;
}
@ -395,6 +396,7 @@ application::run_result application::process_events()
// the thread termination loop below to make sure all
// already-spawned threads get terminated gracefully
ctx.res = run_result::fatal(e.what());
ctx.finished->store(true, std::memory_order_seq_cst);
break;
}
}