fix bugs
cargo devel CI / cargo CI (push) Failing after 6s Details

This commit is contained in:
Christoph J. Scherr 2024-08-21 11:56:52 +02:00
parent ffd8461368
commit cd6a5c21d2
1 changed files with 6 additions and 3 deletions

View File

@ -11,7 +11,8 @@ use tokio::{
net::TcpStream,
};
use tokio_rustls::{
rustls::{self, pki_types}, TlsConnector, TlsStream
rustls::{self, pki_types},
TlsConnector, TlsStream,
};
use webpki_roots;
@ -47,11 +48,13 @@ impl Client {
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 {
cfg: cfg.clone(),
stream,
stream: tokio_rustls::TlsStream::Client(stream),
connector,
domain,
})