From 36e4fb44e88807c9d4ca5d8882053c6452458dca Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Fri, 25 Dec 2020 01:30:57 +0800 Subject: [PATCH] update tokio-native-tls --- actix-tls/Cargo.toml | 2 +- actix-tls/src/openssl.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/actix-tls/Cargo.toml b/actix-tls/Cargo.toml index ffbda2db..761cc45b 100644 --- a/actix-tls/Cargo.toml +++ b/actix-tls/Cargo.toml @@ -53,7 +53,7 @@ webpki-roots = { version = "0.20", optional = true } # native-tls native-tls = { version = "0.2", optional = true } -tokio-native-tls = { version = "0.2.0", optional = true } +tokio-native-tls = { version = "0.3.0", optional = true } [dev-dependencies] bytes = "1" diff --git a/actix-tls/src/openssl.rs b/actix-tls/src/openssl.rs index e589249a..3b69d4b4 100644 --- a/actix-tls/src/openssl.rs +++ b/actix-tls/src/openssl.rs @@ -115,6 +115,8 @@ impl Future for AcceptorServiceResponse { fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { loop { match self.as_mut().get_mut() { + // Init branch only used to return the error in future + // on success goes to Accept branch directly. AcceptorServiceResponse::Init(res, guard) => { let guard = guard.take(); let stream = res.take().unwrap()?;