Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't unconditionally shut down the SslStream
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.
- Loading branch information