Skip to content

Commit

Permalink
Merge pull request #1756 from fluent/ensure-close-io-v12
Browse files Browse the repository at this point in the history
Ensure close temporaly opened IO object
  • Loading branch information
repeatedly authored Nov 19, 2017
2 parents e2d4fd6 + f1d92f5 commit fb2f596
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/fluent/plugin/in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ def on_rotate(io)
io_handler = IOHandler.new(io, @pe, @log, @read_lines_limit, &method(:wrap_receive_lines))
@io_handler = io_handler
else # file is rotated and new file found
io.close unless io.closed?
detach
@update_watcher.call(@path, swap_state(@pe))
end
Expand Down

0 comments on commit fb2f596

Please sign in to comment.