diff --git a/plugins/in_tail/tail.c b/plugins/in_tail/tail.c index 8a6efb1ec48..65588a0327b 100644 --- a/plugins/in_tail/tail.c +++ b/plugins/in_tail/tail.c @@ -410,6 +410,7 @@ static int in_tail_exit(void *data, struct flb_config *config) struct flb_tail_config *ctx = data; flb_tail_file_remove_all(ctx); + flb_tail_fs_exit(ctx); flb_tail_config_destroy(ctx); return 0; diff --git a/plugins/in_tail/tail_fs_inotify.c b/plugins/in_tail/tail_fs_inotify.c index 5fea2de2b00..ac9e3620e85 100644 --- a/plugins/in_tail/tail_fs_inotify.c +++ b/plugins/in_tail/tail_fs_inotify.c @@ -363,6 +363,5 @@ int flb_tail_fs_inotify_remove(struct flb_tail_file *file) int flb_tail_fs_inotify_exit(struct flb_tail_config *ctx) { - (void) ctx; - return 0; + return close(ctx->fd_notify); }