in_tail: When option exit_on_eof=true wait for all the files to be read
and then exit, otherwise with the first EOF it will exit and stop reading
all other files
@@ -153,8 +153,10 @@ static int in_tail_collect_static(struct flb_input_instance *ins,
if (file->config->exit_on_eof) {
flb_plg_info(ctx->ins, "inode=%"PRIu64" file=%s ended, stop",
file->inode, file->name);
+ if (mk_list_size(&ctx->files_static) == 1) {
flb_engine_exit(config);
}
+ }
/* Promote file to 'events' type handler */
flb_plg_debug(ctx->ins, "inode=%"PRIu64" file=%s promote to TAIL_EVENT",
file->inode, file->name);
