googleapis / google-cloud-go

Google Cloud Client Libraries for Go.
https://cloud.google.com/go/docs/reference
Apache License 2.0
3.72k stars 1.28k forks source link

Close Response Body for failed request #10889

Closed guymaor-google closed 1 week ago

guymaor-google commented 1 week ago

The getETag function only closes the last response at the end of the function, but does not close failed responses.

This leads to memory leaks and even out of memory if Subscribe is called in a loop.

conventional-commit-lint-gcf[bot] commented 1 week ago

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot https://conventionalcommits.org/