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

UnixStream::poll_shutdown is not a no-op #2245

Merged
merged 2 commits into from
Feb 14, 2020
Merged

Conversation

jonhoo
Copy link
Sponsor Contributor

@jonhoo jonhoo commented Feb 14, 2020

This brings UnixStream::poll_shutdown in line with TcpStream::poll_shutdown.

@jonhoo
Copy link
Sponsor Contributor Author

jonhoo commented Feb 14, 2020

@carllerche
Copy link
Member

Is there any way to test it? In theory, the peer should receive read readiness and get Ok(0)?

Copy link
Member

@carllerche carllerche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test would be nice

@jonhoo
Copy link
Sponsor Contributor Author

jonhoo commented Feb 14, 2020

Added in 218f265. Funnily enough, the implementation of AsyncWrite for unix::WriteHalf already did shutdown and had a test for it, so this just makes that behavior consistent.

@carllerche
Copy link
Member

Great 👍 thanks. Merge on green!

@jonhoo jonhoo merged commit fc65951 into master Feb 14, 2020
@jonhoo jonhoo deleted the jonhoo/unix-socket-shutdown branch February 14, 2020 17:22
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.

None yet

2 participants