Skip to content

Clone the field definition #16

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

Closed
wants to merge 1 commit into from
Closed
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
Clone the field definition
Otherwise we end up changing the field definitions.
  • Loading branch information
bodgit committed Aug 18, 2015
commit 31284f8391664ef945a7524bb714a0a40b9651ea
2 changes: 1 addition & 1 deletion lib/logstash/codecs/netflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def uint_field(length, default)

def netflow_field_for(type, length)
if @fields.include?(type)
field = @fields[type]
field = @fields[type].clone
if field.is_a?(Array)

field[0] = uint_field(length, field[0]) if field[0].is_a?(Integer)
Expand Down