diff --git a/lib/fluent/plugin/in_forward.rb b/lib/fluent/plugin/in_forward.rb index 6c27c0ea6d..60f6a6cd37 100644 --- a/lib/fluent/plugin/in_forward.rb +++ b/lib/fluent/plugin/in_forward.rb @@ -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))