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

close half-closed socket to avoid leak #231

Merged
merged 1 commit into from Aug 20, 2015

Conversation

ajiyoshi-vg
Copy link
Contributor

fix #230

inet:peername/1 returns {error, enotconnect} against half-closed sockets. so they should be closed here.
we make millions of http requests per minute and get few socket leak. It is very rare case and hard to reproduce.
but when someone checkin a socket to the pool, e.g. it means " I release the ownership of it. I will never read, write and CLOSE it." , so it is sane for hackney_pool to close the half-closed socket here.

benoitc added a commit that referenced this pull request Aug 20, 2015
close half-closed socket to avoid leak
@benoitc benoitc merged commit 6e5465d into benoitc:master Aug 20, 2015
@benoitc
Copy link
Owner

benoitc commented Aug 20, 2015

Thanks!

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.

hackney_pool leaks sockets when half-closed sockets are checkin-ed
2 participants