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

http connection not closing properly #9

Open
chrisdziegielewski opened this issue Jul 18, 2019 · 0 comments
Open

http connection not closing properly #9

chrisdziegielewski opened this issue Jul 18, 2019 · 0 comments

Comments

@chrisdziegielewski
Copy link

chrisdziegielewski commented Jul 18, 2019

If you are moving a high volume of messages to splunk, the doRequest (splunk/splunk.go) function is not properly closing the http request and you quickly run out of file descriptors. The code below should be added before each of the returns on lines 164 and 173. It's better not to use the "defer" as this also waits longer than necessary to close the connection.

if res != nil {
	res.Body.Close()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant