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

Return error at end of plaintext stream if we saw an EOF on the TLS stream #790

Merged
merged 2 commits into from
Jul 24, 2021

Conversation

ctz
Copy link
Member

@ctz ctz commented Jul 24, 2021

This incorporates #779

djc and others added 2 commits July 8, 2021 23:18
The peer is not required to send us `CloseNotify`, but if the socket has
shutdown we should act accordingly.
The only way to see an Ok(0) from Connection::read() is via a close_notify alert.

Unclean closure (ie, just a TCP EOF without a close_notify) leads
to an `UnexpectedEof` from Connection::read().  Applications which
want to accept that can do so -- bogo_shim is such an example.

Add tests for this and IoState::peer_has_closed()
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