Skip to content

Commit

Permalink
Do not close connection until write is complete on failed auth PONG
Browse files Browse the repository at this point in the history
  • Loading branch information
arcivanov committed Jan 27, 2018
1 parent b3d51c2 commit 1d8b3cf
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 1d8b3cf

Please sign in to comment.