Commit 3525494
committed
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.1 parent 70edf38 commit 3525494
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
273 | 283 | | |
274 | 284 | | |
275 | 285 | | |
| |||
0 commit comments