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

Memory leak in "A simple HTTP retry and backoff loop in Go" #311

Closed
creativecreature opened this issue Sep 13, 2022 · 2 comments
Closed

Comments

@creativecreature
Copy link

Hi,

I think you've forgotten to close the response body in this article.

Here is the output from a pprof before closing the body:

Screenshot 2022-09-13 at 09 29 09

Here is the output from a pprof after closing the body:

Screenshot 2022-09-13 at 09 30 13

I ran 1000 requests.

@brandur
Copy link
Owner

brandur commented Sep 13, 2022

Thanks Victor. Yep, there's indeed a missing body close there. Fixed in 79a8091. Thanks!

@creativecreature
Copy link
Author

Happy to help!

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

2 participants