fix build fails
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user