From 13a6d61c0e1ba66b23bd59a954b89eb601ed3917 Mon Sep 17 00:00:00 2001 From: Jeff Mendez Date: Wed, 8 Jan 2025 08:55:15 -0500 Subject: [PATCH] chore(connect): fix duplicate TokioIo connection --- src/connect.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/connect.rs b/src/connect.rs index dfaf028a9..7c42ce3c9 100644 --- a/src/connect.rs +++ b/src/connect.rs @@ -356,7 +356,6 @@ impl ConnectorService { let host = dst.host().ok_or("no host in url")?.to_string(); let conn = socks::connect(proxy, dst, dns).await?; let conn = TokioIo::new(conn); - let conn = TokioIo::new(conn); let tls_connector = tokio_native_tls::TlsConnector::from(tls.clone()); let io = tls_connector.connect(&host, conn).await?; let io = TokioIo::new(io); @@ -377,7 +376,6 @@ impl ConnectorService { let host = dst.host().ok_or("no host in url")?.to_string(); let conn = socks::connect(proxy, dst, dns).await?; let conn = TokioIo::new(conn); - let conn = TokioIo::new(conn); let server_name = rustls_pki_types::ServerName::try_from(host.as_str().to_owned()) .map_err(|_| "Invalid Server Name")?;