Increase dependency specificity for async-tls #18

Closed
Ghost wants to merge 1 commits from (deleted):fix-main-build into main
2 changed files with 2 additions and 3 deletions

View File

@ -11,7 +11,7 @@ repository = "https://tulpa.dev/cadey/maj"
[dependencies]
async-std = { version = "1.6", optional = true }
async-tls = { default-features = false, optional = true, version = "0" }
async-tls = { default-features = false, optional = true, version = "=0.10.0" }
async-trait = { version = "0", optional = true }
log = "0.4"
mime_guess = "2.0"

View File

@ -51,10 +51,9 @@ pub async fn serve(
) -> Result
where
{
let cfg = Arc::new(cfg);
let listener = TcpListener::bind(&format!("{}:{}", host, port)).await?;
let mut incoming = listener.incoming();
let acceptor = Arc::new(TlsAcceptor::from(cfg.clone()));
let acceptor = Arc::new(TlsAcceptor::from(cfg));
while let Some(Ok(stream)) = incoming.next().await {
let h = h.clone();
let acceptor = acceptor.clone();