Skip to content

Handle short reads and writes for TCP sockets#5023

Open
WhySoBad wants to merge 1 commit intorust-lang:masterfrom
WhySoBad:network-socket-epoll-edge-on-empty
Open

Handle short reads and writes for TCP sockets#5023
WhySoBad wants to merge 1 commit intorust-lang:masterfrom
WhySoBad:network-socket-epoll-edge-on-empty

Conversation

@WhySoBad
Copy link
Copy Markdown
Contributor

@WhySoBad WhySoBad commented May 10, 2026

Hi,

As mentioned in #5005, this pull request adds handling for short reads and writes on TCP sockets.
Because short reads/writes imply an empty/full buffer on Unix hosts, we need to remove the readiness in those cases. On Windows hosts, we need to forcefully emit a new readiness event to prevent applications relying on this behavior from being stuck forever.

The tcp_echo test would not finish with the current implementation, thus I adjusted this test case and added it here, to ensure that it finishes with the new handling.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 10, 2026

Thank you for contributing to Miri! A reviewer will take a look at your PR, typically within a week or two.
Please remember to not force-push to the PR branch except when you need to rebase due to a conflict or when the reviewer asks you for it.

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Waiting for a review to complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants