diff options
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_functions.c')
-rw-r--r-- | collectors/ebpf.plugin/ebpf_functions.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/collectors/ebpf.plugin/ebpf_functions.c b/collectors/ebpf.plugin/ebpf_functions.c index 2aaf91324f..ebee663950 100644 --- a/collectors/ebpf.plugin/ebpf_functions.c +++ b/collectors/ebpf.plugin/ebpf_functions.c @@ -1069,11 +1069,10 @@ void *ebpf_function_thread(void *ptr) { (void)ptr; - bool ebpf_function_plugin_exit = false; struct functions_evloop_globals *wg = functions_evloop_init(1, "EBPF", &lock, - &ebpf_function_plugin_exit); + &ebpf_plugin_exit); functions_evloop_add_function(wg, "ebpf_socket", @@ -1082,13 +1081,10 @@ void *ebpf_function_thread(void *ptr) heartbeat_t hb; heartbeat_init(&hb); - while(!ebpf_exit_plugin) { + while(!ebpf_plugin_exit) { (void)heartbeat_next(&hb, USEC_PER_SEC); - if (ebpf_function_plugin_exit) { - pthread_mutex_lock(&ebpf_exit_cleanup); - ebpf_stop_threads(0); - pthread_mutex_unlock(&ebpf_exit_cleanup); + if (ebpf_plugin_exit) { break; } } |