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 socket on close_connection even after close_connection_after_writing #694

Merged
merged 1 commit into from
Mar 11, 2016
Merged

Conversation

mdpye
Copy link
Contributor

@mdpye mdpye commented Mar 11, 2016

Previously, calls to close now were ignored if a close was scheduled for after we finish writing. This was problematic in any case where a graceful close was scheduled, but the send buffer might never be consumed, for example:

  • stuck TCP connections
  • extremely slow readers

...even if we have previously asked to close later. Many places in the
codebase use ScheduleClose(false) when they have found out that the
socket is no longer operational, but they are being ignored if
ScheduleClose(true) has been used in the past. As the socket is often
not working at this point, we will never get through the send queue and
actually do the close.
@sodabrew
Copy link
Member

Thank you!

@sodabrew sodabrew added this to the v1.2.0 milestone Mar 11, 2016
sodabrew added a commit that referenced this pull request Mar 11, 2016
Close socket on close_connection even after close_connection_after_writing
@sodabrew sodabrew merged commit 8cfcc0e into eventmachine:master Mar 11, 2016
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.

2 participants