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: close HTTP resp body to prevent resource leak #4857

Merged
merged 1 commit into from
May 12, 2024

Conversation

alexandear
Copy link
Contributor

This PR fixes possible resource leaks by adding a statement that closes a response body.

From the documentation:

The caller must close the response body when finished with it

Also, see this article for a deep dive into the problem.

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 11, 2024
Copy link

codecov bot commented May 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 83.80%. Comparing base (c68d830) to head (03f5e04).
Report is 255 commits behind head on main.

Files Patch % Lines
internal/pipe/discord/discord.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4857      +/-   ##
==========================================
+ Coverage   83.77%   83.80%   +0.03%     
==========================================
  Files         135      139       +4     
  Lines       13029    11233    -1796     
==========================================
- Hits        10915     9414    -1501     
+ Misses       1677     1356     -321     
- Partials      437      463      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@caarlos0 caarlos0 merged commit c5204df into goreleaser:main May 12, 2024
10 of 11 checks passed
@caarlos0 caarlos0 added the bug Something isn't working label May 12, 2024
@caarlos0
Copy link
Member

thanks!!

@alexandear alexandear deleted the fix/close-http-resp-body branch May 12, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants