Skip to content

Commit

Permalink
block nil
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <[email protected]>
  • Loading branch information
ganmacs committed Dec 11, 2019
1 parent 5ff5219 commit 7f79b79
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/fluent/plugin/buf_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def start
end

def stop
@variable_store.delete(@buffer_path)
if @variable_store
@variable_store.delete(@buffer_path)
end

super
end
Expand Down
4 changes: 3 additions & 1 deletion lib/fluent/plugin/buf_file_single.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def start
end

def stop
@variable_store.delete(@path)
if @variable_store
@variable_store.delete(@path)
end

super
end
Expand Down
4 changes: 3 additions & 1 deletion lib/fluent/plugin/in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ def start
end

def stop
@variable_store.delete(@pos_file)
if @variable_store
@variable_store.delete(@pos_file)
end

super
end
Expand Down
4 changes: 3 additions & 1 deletion lib/fluent/plugin_id.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ def plugin_root_dir
end

def stop
@_plugin_id_variable_store.delete(@id)
if @_plugin_id_variable_store
@_plugin_id_variable_store.delete(@id)
end

super
end
Expand Down

0 comments on commit 7f79b79

Please sign in to comment.