Skip to content

Commit

Permalink
engine: free self_events channels only when the loop is active.
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Whelan <[email protected]>
  • Loading branch information
pwhelan committed Jan 17, 2024
1 parent ae8fa99 commit 4c722de
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/flb_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,10 +1135,12 @@ int flb_engine_shutdown(struct flb_config *config)
flb_hs_destroy(config->http_ctx);
}
#endif
mk_event_channel_destroy(config->evl,
config->ch_self_events[0],
config->ch_self_events[1],
&config->event_thread_init);
if (config->evl) {
mk_event_channel_destroy(config->evl,
config->ch_self_events[0],
config->ch_self_events[1],
&config->event_thread_init);
}

return 0;
}
Expand Down

0 comments on commit 4c722de

Please sign in to comment.