Skip to content
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

Unable to set read buffer on tcp socket in socket_listener #3873

Closed
danielnelson opened this issue Mar 9, 2018 · 5 comments
Closed

Unable to set read buffer on tcp socket in socket_listener #3873

danielnelson opened this issue Mar 9, 2018 · 5 comments
Labels
bug unexpected problem or unintended behavior

Comments

@danielnelson
Copy link
Contributor

Bug report

Relevant telegraf.conf:

[[inputs.socket_listener]]
  service_address = "tcp://:8094"
  read_buffer_size = 65535

System info:

Telegraf 1.5.2

Steps to reproduce:

  1. Enable socket_listener as described above
  2. Start Telegraf

Expected behavior:

Read buffer size set

Actual behavior:

2018-03-09T01:37:59Z W! Unable to set read buffer on a tcp socket
@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Mar 9, 2018
@danielnelson
Copy link
Contributor Author

@phemmer I'm confused how this code works, it looks like we are attempting to call SetReadBuffer on a Listener type, which would never have this function, instead of on a Conn type.

https://github.com/influxdata/telegraf/blob/master/plugins/inputs/socket_listener/socket_listener.go#L234-L246

@phemmer
Copy link
Contributor

phemmer commented Mar 9, 2018

You're right. Oops. I have no idea what I was thinking when I wrote that. That should be moved to after the accept.

@phemmer
Copy link
Contributor

phemmer commented Mar 9, 2018

Trivial fix. You want me to do it, or are you getting it?

@danielnelson
Copy link
Contributor Author

I'm always willing to let someone else do my work :)

@phemmer
Copy link
Contributor

phemmer commented Mar 9, 2018

Well I kinda feel like I should clean up my own mess, so I'll do it now. Have a PR up in a few :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants