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

Refactor zoom package #29

Merged
merged 2 commits into from Jun 13, 2019
Merged

Refactor zoom package #29

merged 2 commits into from Jun 13, 2019

Conversation

hanzei
Copy link
Collaborator

@hanzei hanzei commented Jun 13, 2019

Follow up from #25

@hanzei hanzei added the 2: Dev Review Requires review by a core committer label Jun 13, 2019
@hanzei hanzei requested review from levb and crspeller June 13, 2019 10:42
func closeBody(r *http.Response) {
if r.Body != nil {
ioutil.ReadAll(r.Body)
r.Body.Close()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't know if this method is needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, responses for requests open by a client need to be closed, explicitly, even for a Keep-alive (the http stack manages the connections itself)

func closeBody(r *http.Response) {
if r.Body != nil {
ioutil.ReadAll(r.Body)
r.Body.Close()
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, responses for requests open by a client need to be closed, explicitly, even for a Keep-alive (the http stack manages the connections itself)

@crspeller crspeller merged commit ea8bf47 into master Jun 13, 2019
@crspeller crspeller deleted the refactor branch June 13, 2019 19:19
@hanzei hanzei added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants