-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Labels
FilebeatFilebeatFilebeatTeam:Security-Deployment and DevicesDeployment and Devices Team in Security SolutionDeployment and Devices Team in Security Solution
Description
beats/filebeat/inputsource/udp/server.go
Lines 65 to 67 in 56a17e0
| socketSize := int(u.config.ReadBuffer) * humanize.KiByte | |
| if socketSize != 0 { | |
| if err := listener.SetReadBuffer(int(u.config.ReadBuffer)); err != nil { |
There is no need to multiple the config.ReadBuffer by the size of KiB. The value is already converted into the user's specified unit type when the config is unmarshaled. And secondly, the resulting value is only used in the context of checking if it is non-zero.
So just remove the entire declaration of the socketSize variable in this code.
Metadata
Metadata
Assignees
Labels
FilebeatFilebeatFilebeatTeam:Security-Deployment and DevicesDeployment and Devices Team in Security SolutionDeployment and Devices Team in Security Solution