Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow up #3267 #3285

Merged
merged 2 commits into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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