From 671f24ab49c03e9279f1bc10dc9d69377d02ce75 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Sun, 21 Feb 2021 11:14:50 -0800 Subject: [PATCH] Offer separate error during handshakes. It's useful to know that an error was specific to the TLS handshake, versus the TCP connect, or a later stage of a request. --- src/stream.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/stream.rs b/src/stream.rs index 5850066..b491fdd 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -1,4 +1,5 @@ use log::debug; +use rustls::Session; use std::io::{self, BufRead, BufReader, Read, Write}; use std::net::SocketAddr; use std::net::TcpStream; @@ -349,10 +350,14 @@ pub(crate) fn connect_https(unit: &Unit, hostname: &str) -> Result