fixes #165: discard disconnected accepted sockets - #166
Open
kentbull wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
If we want to do a 0.6.x release then this is easily cherry-pickeable to a 0.6.x branch, we just need to make said branch. |
kentbull
force-pushed
the
fix/accepted-socket-disconnect-v0.7.19
branch
2 times, most recently
from
August 19, 2026 18:30
8980b8a to
e220412
Compare
A peer may disconnect after accept() but before serviceAxes() inspects the socket addresses. getpeername() or getsockname() then raises an OSError that escapes the server loop and terminates the process. Close and discard the disconnected socket while allowing the listener to continue. Add regression coverage for both plaintext and TLS servers that also verifies a subsequent healthy connection is accepted.
kentbull
force-pushed
the
fix/accepted-socket-disconnect-v0.7.19
branch
from
August 19, 2026 18:43
e220412 to
c3e7e3d
Compare
kentbull
added a commit
to kentbull/hio
that referenced
this pull request
Aug 20, 2026
Replace the platform-dependent TCP reset with the mocked peer-lookup failure now used by upstream PR ioflo#166. The test still exercises a failed accepted socket followed by a healthy one, while producing consistent behavior on Windows.
This was referenced Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A peer may disconnect after accept() but before serviceAxes() inspects the socket addresses. getpeername() or getsockname() then raises an OSError that escapes the server loop and terminates the process.
Close and discard the disconnected socket while allowing the listener to continue. Add regression coverage for both plaintext and TLS servers that also verifies a subsequent healthy connection is accepted.
Fixes #165