Skip to content

Commit

Permalink
Merge pull request #49 from nanjj/master
Browse files Browse the repository at this point in the history
Do not adjust udp buffer size for default value 0
  • Loading branch information
SuperQ committed Jan 22, 2018
2 parents 5db437d + 3d3bc8f commit e7c22b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func startCollectdServer(ctx context.Context, w api.Writer) {
if err != nil {
log.Fatalf("Failed to create a socket for a binary protocol server: %v", err)
}
if *collectdBuffer >= 0 {
if *collectdBuffer > 0 {
if err = srv.Conn.SetReadBuffer(*collectdBuffer); err != nil {
log.Fatalf("Failed to adjust a read buffer of the socket: %v", err)
}
Expand Down

0 comments on commit e7c22b0

Please sign in to comment.