Skip to content

Commit

Permalink
in_tail: Skip setup failed watcher to avoid resource leak and log blo…
Browse files Browse the repository at this point in the history
…at. Backport fluent#1742
  • Loading branch information
Yuki Ito committed Nov 18, 2017
1 parent fb743e3 commit a1477d6
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 @@ -499,6 +499,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?
@update_watcher.call(@path, swap_state(@pe))
end
else # file is rotated and new file not found
Expand Down

0 comments on commit a1477d6

Please sign in to comment.