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

Fixes to improve http connection re-use #6

Merged
merged 2 commits into from
Mar 4, 2016
Merged

Conversation

aalness
Copy link
Contributor

@aalness aalness commented Mar 4, 2016

w/suggestions from @akalin-keybase

@@ -84,6 +85,12 @@ type Reporter struct {
// default http transport.
func NewReporter(bufferSize, poolSize int, transport http.RoundTripper) *Reporter {
r := new(Reporter)
if transport == nil {
transport = &http.Transport{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the function comment to mention the increased parameter?

Also worth mentioning in the function comment that if you pass in your own transport, it's a good idea to have its MaxidleConnsPerHost be at least the poolSize, and why.

@akalin-keybase
Copy link

👍

@patrickxb
Copy link
Collaborator

Thanks Andy!

patrickxb added a commit that referenced this pull request Mar 4, 2016
Fixes to improve http connection re-use
@patrickxb patrickxb merged commit 91dfa3a into stathat:master Mar 4, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants