Skip to content

Commit

Permalink
fix(libsinsp/parsers): call immediately call on_erase_fd callback
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Jan 23, 2025
1 parent 6c46ed3 commit 5a8b440
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions userspace/libsinsp/parsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3226,17 +3226,7 @@ void sinsp_parser::erase_fd(erase_fd_params *params) {
// If there's a listener, add a callback to later invoke it.
//
if(m_inspector->get_observer()) {
auto ts = params->m_ts;
auto remove_from_table = params->m_remove_from_table;
auto fd = params->m_fd;
auto tinfo = params->m_tinfo;
auto fdinfo = params->m_fdinfo;
m_inspector->m_post_process_cbs.emplace(
[ts, remove_from_table, fd, tinfo, fdinfo](sinsp_observer *observer,
sinsp_evt *evt) {
erase_fd_params p = {remove_from_table, fd, tinfo, fdinfo, ts};
observer->on_erase_fd(&p);
});
m_inspector->get_observer()->on_erase_fd(params);
}
}

Expand Down

0 comments on commit 5a8b440

Please sign in to comment.