Skip to content

Commit

Permalink
Merge pull request #3754 from fluent/issue3752
Browse files Browse the repository at this point in the history
in_tail: Add a missing nil check for rotated_tw in update_watcher
  • Loading branch information
ashie committed May 24, 2022
2 parents ebab9db + e3f0bb0 commit 8f35549
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/in_tail.rb
Expand Up @@ -511,7 +511,7 @@ def update_watcher(target_info, pe)
if new_position_entry.read_inode == 0
# When follow_inodes is true, it's not cleaned up by refresh_watcher.
# So it should be unwatched here explicitly.
rotated_tw.unwatched = true
rotated_tw.unwatched = true if rotated_tw
@tails[path] = setup_watcher(target_info, new_position_entry)
@tails[path].on_notify
end
Expand Down

0 comments on commit 8f35549

Please sign in to comment.