Skip to content

Commit a898093

Browse files
author
Lucas Pires
committed
fix create_if_deleted logic by closing the file handle, fix #81
1 parent fd1f296 commit a898093

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/logstash/outputs/file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def open(path)
247247
if deleted?(path)
248248
if @create_if_deleted
249249
@logger.debug("Required path was deleted, creating the file again", :path => path)
250-
@files.delete(path)
250+
@files.delete(path).close if cached?(path)
251251
else
252252
return @files[path] if cached?(path)
253253
end

0 commit comments

Comments
 (0)