fix(userspace/falco): properly start/stop capture.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
Federico Di Pierro 2022-11-24 14:30:15 +01:00 committed by poiana
parent 928ad6625b
commit 17dfe4f55d

View File

@ -231,6 +231,7 @@ void application::process_inspector_events(
application::source_sync_context* sync, application::source_sync_context* sync,
application::run_result* res) noexcept application::run_result* res) noexcept
{ {
inspector->start_capture();
try try
{ {
double duration; double duration;
@ -276,7 +277,7 @@ void application::process_inspector_events(
{ {
*res = run_result::fatal(e.what()); *res = run_result::fatal(e.what());
} }
inspector->stop_capture();
if (sync) if (sync)
{ {
sync->finish(); sync->finish();