Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/fluent/logger/fluent_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,15 @@ def write(msg)
end

begin
send_data(@pending)
data_to_send = @pending
@pending = nil
send_data(data_to_send)
true
rescue => e
set_last_error(e)
if pending_bytesize > @limit
@logger.error("FluentLogger: Can't send logs to #{connection_string}: #{$!}")
call_buffer_overflow_handler(@pending)
@pending = nil
call_buffer_overflow_handler(data_to_send)
end
@con.close if connect?
@con = nil
Expand Down