From bb4b91668828e132b392e899f4ec5a92eb281055 Mon Sep 17 00:00:00 2001 From: Lucas Kent Date: Tue, 25 Oct 2022 15:56:50 +1100 Subject: [PATCH] review feedback --- shotover-proxy/src/tls.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shotover-proxy/src/tls.rs b/shotover-proxy/src/tls.rs index 7b071f8d0..ddf66889a 100644 --- a/shotover-proxy/src/tls.rs +++ b/shotover-proxy/src/tls.rs @@ -92,7 +92,10 @@ impl TlsConnector { .into_ssl("localhost")?; let mut ssl_stream = SslStream::new(ssl, tcp_stream)?; - Pin::new(&mut ssl_stream).connect().await?; + Pin::new(&mut ssl_stream) + .connect() + .await + .map_err(|e| anyhow!(e).context("Failed to establish TLS connection to destination"))?; Ok(ssl_stream) } @@ -104,7 +107,7 @@ impl TlsConnector { Pin::new(&mut ssl_stream) .connect() .await - .map_err(|e| anyhow!(e).context("Failed to connect to TLS connection"))?; + .map_err(|e| anyhow!(e).context("Failed to establish TLS connection to destination"))?; Ok(ssl_stream) }