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
Showing only changes of commit 182b3e5da6 - Show all commits

View File

@ -11,7 +11,7 @@ repository = "https://tulpa.dev/cadey/maj"
[dependencies] [dependencies]
async-std = { version = "1.6", optional = true } 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 } async-trait = { version = "0", optional = true }
log = "0.4" log = "0.4"
mime_guess = "2.0" mime_guess = "2.0"

View File

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