Skip to content

Commit

Permalink
chore(connect): fix duplicate TokioIo connection
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez authored Jan 8, 2025
1 parent 8b8fdd2 commit 13a6d61
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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")?;
Expand Down

0 comments on commit 13a6d61

Please sign in to comment.