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

fix(internal/gensupport): close resp body only on discarding resp (resumableupload) #2966

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

BrennaEpp
Copy link
Contributor

internal, see: b/389767299

@BrennaEpp BrennaEpp requested a review from a team as a code owner January 17, 2025 02:36
@@ -256,6 +256,10 @@ func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err
rCtx, cancel = context.WithTimeout(ctx, rx.ChunkTransferTimeout)
}

if resp != nil && resp.Body != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment about why this is necessary and why it happens at this point in the loop.

@BrennaEpp BrennaEpp requested a review from codyoss January 22, 2025 02:42
@codyoss codyoss added the automerge Merge the pull request once unit tests and other checks pass. label Jan 22, 2025
@codyoss codyoss merged commit 840d496 into googleapis:main Jan 22, 2025
4 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jan 22, 2025
gcf-merge-on-green bot pushed a commit that referenced this pull request Jan 22, 2025
🤖 I have created a release *beep* *boop*
---


## [0.218.0](https://github.com/googleapis/google-api-go-client/compare/v0.217.0...v0.218.0) (2025-01-22)


### Features

* Add error helper that does not read the response body ([#2964](https://github.com/googleapis/google-api-go-client/issues/2964)) ([9e749c4](https://github.com/googleapis/google-api-go-client/commit/9e749c4155022ced228d0989315f21b40b43af5c))
* **all:** Auto-regenerate discovery clients ([#2963](https://github.com/googleapis/google-api-go-client/issues/2963)) ([0bf19b3](https://github.com/googleapis/google-api-go-client/commit/0bf19b3736d5fc9b329e2fc73f7b45c79911373f))
* **all:** Auto-regenerate discovery clients ([#2967](https://github.com/googleapis/google-api-go-client/issues/2967)) ([a978c49](https://github.com/googleapis/google-api-go-client/commit/a978c49382816b1011c2f5eaeaee5e0ff7741f94))
* **all:** Auto-regenerate discovery clients ([#2969](https://github.com/googleapis/google-api-go-client/issues/2969)) ([a8aed4d](https://github.com/googleapis/google-api-go-client/commit/a8aed4dd688bcbc6e44b43211c58e5e09bb772e5))
* **all:** Auto-regenerate discovery clients ([#2970](https://github.com/googleapis/google-api-go-client/issues/2970)) ([607d371](https://github.com/googleapis/google-api-go-client/commit/607d371e04db7b53fb6d6327bb4ac770dac7d772))
* **all:** Auto-regenerate discovery clients ([#2972](https://github.com/googleapis/google-api-go-client/issues/2972)) ([0f4ee9d](https://github.com/googleapis/google-api-go-client/commit/0f4ee9d9b0f08d935da8bc5c8169e24b462307a3))
* **all:** Auto-regenerate discovery clients ([#2973](https://github.com/googleapis/google-api-go-client/issues/2973)) ([e143e5c](https://github.com/googleapis/google-api-go-client/commit/e143e5cadc749d877a27ba41b5b954fca3195776))
* **all:** Auto-regenerate discovery clients ([#2974](https://github.com/googleapis/google-api-go-client/issues/2974)) ([0d0bcdf](https://github.com/googleapis/google-api-go-client/commit/0d0bcdffc9017f5647b78b1405940c330578b3a1))


### Bug Fixes

* **internal/gensupport:** Close resp body only on discarding resp (resumableupload) ([#2966](https://github.com/googleapis/google-api-go-client/issues/2966)) ([840d496](https://github.com/googleapis/google-api-go-client/commit/840d49666b8c5e8ca1c07880cb6be2f0b78fbd6d))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.

3 participants