fix build fails

This commit is contained in:
Keijia authored and Martin Algesten committed 2021-08-23 20:46:44 +02:00
1 parent f6f021cdbb
commit c7292919e5
1 file changed
+3 -3
+3 -3
View File
@@ -410,9 +410,9 @@ pub(crate) fn connect_host(unit: &Unit, hostname: &str, port: u16) -> Result<Tcp
}; };
debug!("connecting to {} at {}", netloc, &sock_addr); debug!("connecting to {} at {}", netloc, &sock_addr);
// connect with a configured timeout. // connect with a configured timeout.
let stream = if Some(Proto::HTTPConnect) != proto { let stream = if proto.is_some() && Some(Proto::HTTPConnect) != proto {
let Some(proto_r) = proto;
connect_socks( connect_socks(
unit, unit,
proxy.clone().unwrap(), proxy.clone().unwrap(),
@@ -420,7 +420,7 @@ pub(crate) fn connect_host(unit: &Unit, hostname: &str, port: u16) -> Result<Tcp
sock_addr, sock_addr,
hostname, hostname,
port, port,
proto_r, proto.unwrap(),
) )
} else if let Some(timeout) = timeout { } else if let Some(timeout) = timeout {
TcpStream::connect_timeout(&sock_addr, timeout) TcpStream::connect_timeout(&sock_addr, timeout)