Skip to content

Commit

Permalink
in_tail: Use fixed value instead of variable
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
  • Loading branch information
cosmo0920 committed Dec 22, 2020
1 parent f0dbbf1 commit 994d47a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/fluent/plugin/in_tail.rb
Expand Up @@ -896,15 +896,14 @@ def opened?
def handle_notify
with_io do |io|
begin
bytes_to_read = 8192
number_bytes_read = 0
start_reading = Fluent::EventTime.now
read_more = false

if !io.nil? && @lines.empty?
begin
while true
@fifo << io.readpartial(bytes_to_read, @iobuf)
@fifo << io.readpartial(8192, @iobuf)
@fifo.read_lines(@lines)

number_bytes_read += @lines.last.size
Expand Down

0 comments on commit 994d47a

Please sign in to comment.