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

Don't unconditionally shut down the SslStream #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oscarh
Copy link

@oscarh oscarh commented Dec 18, 2024

OpenSSL doesn't like applications to call SSL_Shutdown on a connection which either hasn't finished the handshake or has fatal errors. This commit only addresses the first case.

When using tokio_openssl::SslStream in hyper, and (a)waiting on the conn returned by for instance hyper::client::conn::http1::handshake(stream) it returns "error shutting down connection" with the nested cause "shutdown while in init" errors if the SSL handshake fails.

This error might not fatal, but it is confusing, and makes it harder find the actual error one is looking for.

OpenSSL doesn't like applications to call SSL_Shutdown on a connection
which either hasn't finished the handshake or has fatal errors. This
commit only addresses the first case.

When using tokio_openssl::SslStream in hyper, and (a)waiting on the conn
returned by for instance hyper::client::conn::http1::handshake(stream)
it returns  "error shutting down connection" with the nested cause
"shutdown while in init" errors if the SSL handshake fails.

This error might not fatal, but it is confusing, and makes it harder
find the actual error one is looking for.
@oscarh oscarh force-pushed the fixup/dont_shut_down_connections_in_init branch from 4256c31 to 3525494 Compare December 18, 2024 21:06
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.

1 participant