Skip to content

Commit

Permalink
Merge pull request #3285 from ashie/followup-3267
Browse files Browse the repository at this point in the history
Follow up #3267
  • Loading branch information
ashie committed Mar 8, 2021
2 parents 12c6aee + 6bf6142 commit ba15b95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/fluent/plugin/out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def try_flush

def last_ack
overwrite_delayed_commit_timeout
ack_check(set_interval)
ack_check(ack_select_interval)
end

def write(chunk)
Expand Down Expand Up @@ -506,7 +506,7 @@ def on_purge_obsolete_socks
@connection_manager.purge_obsolete_socks
end

def set_interval
def ack_select_interval
if @delayed_commit_timeout > 3
1
else
Expand All @@ -515,7 +515,7 @@ def set_interval
end

def ack_reader
select_interval = set_interval
select_interval = ack_select_interval

while thread_current_running?
ack_check(select_interval)
Expand Down
1 change: 1 addition & 0 deletions test/plugin/test_out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def try_write(chunk)
require_ack_response true
ack_response_timeout 2s
])
d.instance_start
assert d.instance.require_ack_response
assert_equal 2, d.instance.ack_response_timeout
end
Expand Down

0 comments on commit ba15b95

Please sign in to comment.