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

Do not close connection until write is complete on failed auth PONG #1835

Merged
merged 1 commit into from
Jan 30, 2018
Merged
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
Do not close connection until write is complete on failed auth PONG
fixes #1834
  • Loading branch information
arcivanov committed Jan 27, 2018
commit 1d8b3cfb181358ad4bcc9a2667f59dd764c54b7c
2 changes: 1 addition & 1 deletion lib/fluent/plugin/in_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ def handle_connection(conn)
when :pingpong
success, reason_or_salt, shared_key = check_ping(msg, conn.remote_addr, user_auth_salt, nonce)
unless success
conn.on(:write_complete) { |c| c.close }
send_data.call(serializer, generate_pong(false, reason_or_salt, nonce, shared_key))
conn.close
next
end
send_data.call(serializer, generate_pong(true, reason_or_salt, nonce, shared_key))
Expand Down