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

Call close on response body method to prevent a resource leak #68

Closed
mmichaelb opened this issue Jan 23, 2018 · 1 comment
Closed

Call close on response body method to prevent a resource leak #68

mmichaelb opened this issue Jan 23, 2018 · 1 comment

Comments

@mmichaelb
Copy link

mmichaelb commented Jan 23, 2018

Not closing the body of HTTP responses can lead to a huge resource leak when doing HTTP requests intensively. The connection probably can remain open, in which case the file descriptor won't be freed. After some time this can cause you to get a 'too many files open' error. Therefore inserting a close statement right before wrapping the response body would be a good change.

If I have misunderstood something or the response is already closed, please let me know.

@thcyron
Copy link
Contributor

thcyron commented Jan 23, 2018

Thank you! Fixed with #69.

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