Skip to content

[question] Drain up to 512 bytes and close the body to let the Transport reuse the connection #843

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

Closed
diorahman opened this issue Feb 4, 2018 · 4 comments

Comments

@diorahman
Copy link
Contributor

Hi, do you think we still need following lines today (with current and newer golang version)?

https://github.com/google/go-github/blob/master/github/github.go#L481-L485

Thanks!

@sahildua2305
Copy link
Member

sahildua2305 commented Feb 4, 2018

@diorahman I see that we support 1.7.x version as well. Since which version are these lines of code redundant?

@willnorris
Copy link
Collaborator

willnorris commented Feb 5, 2018

Looks like it was introduced in 1.7, so should be safe to remove: golang/go@18072ad

@sahildua2305
Copy link
Member

Cool, thanks for checking @willnorris.

Thanks for reporting, @diorahman. Would you like to send a PR to remove these lines? If not, I'll go ahead and remove.

diorahman added a commit to diorahman/go-github that referenced this issue Feb 7, 2018
The behavior on connection reuse is introduced in golang/go@18072ad.

Fixes google#843
@diorahman
Copy link
Contributor Author

I have submitted a PR. Sorry for a bit funky event above hehe. Need to change account due to CLA.

diorahman added a commit to diorahman/go-github that referenced this issue Feb 8, 2018
The behavior on connection reuse without manually draining resp.Body is
introduced in golang/go@18072ad.

Fixes google#843
gmlewis pushed a commit that referenced this issue Mar 5, 2018
nbareil pushed a commit to nbareil/go-github that referenced this issue May 1, 2018
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

3 participants