generated from PlexSheep/rs-base
fix bugs
cargo devel CI / cargo CI (push) Failing after 6s
Details
cargo devel CI / cargo CI (push) Failing after 6s
Details
This commit is contained in:
parent
ffd8461368
commit
cd6a5c21d2
|
@ -11,7 +11,8 @@ use tokio::{
|
||||||
net::TcpStream,
|
net::TcpStream,
|
||||||
};
|
};
|
||||||
use tokio_rustls::{
|
use tokio_rustls::{
|
||||||
rustls::{self, pki_types}, TlsConnector, TlsStream
|
rustls::{self, pki_types},
|
||||||
|
TlsConnector, TlsStream,
|
||||||
};
|
};
|
||||||
use webpki_roots;
|
use webpki_roots;
|
||||||
|
|
||||||
|
@ -47,11 +48,13 @@ impl Client {
|
||||||
return Err(err.into());
|
return Err(err.into());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let mut stream = connector.connect(domain, TcpStream::connect(&cfg.addr).await?).await?;
|
let stream = connector
|
||||||
|
.connect(domain.clone(), TcpStream::connect(&cfg.addr).await?)
|
||||||
|
.await?;
|
||||||
|
|
||||||
Ok(Client {
|
Ok(Client {
|
||||||
cfg: cfg.clone(),
|
cfg: cfg.clone(),
|
||||||
stream,
|
stream: tokio_rustls::TlsStream::Client(stream),
|
||||||
connector,
|
connector,
|
||||||
domain,
|
domain,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue