Skip to content

Commit

Permalink
chunk: fix binmode for prevent gc
Browse files Browse the repository at this point in the history
  • Loading branch information
mocyuto committed Sep 29, 2020
1 parent adca029 commit 16fd62d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/fluent/plugin/buffer/chunk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ def open(**kwargs, &block)
output_io = if chunk_io.is_a?(StringIO)
StringIO.new
else
Tempfile.new('decompressed-data').binmode
Tempfile.new('decompressed-data')
end
output_io.binmode if output_io.is_a?(Tempfile)
decompress(input_io: chunk_io, output_io: output_io)
output_io.seek(0, IO::SEEK_SET)
yield output_io
Expand Down

0 comments on commit 16fd62d

Please sign in to comment.