From 3b9c506b0a26feec2bbe9c1b8947daa4dc3d7753 Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Thu, 28 Jan 2021 01:59:03 -0800 Subject: [PATCH] fix actix-tls build --- actix-tls/src/connect/ssl/openssl.rs | 4 ++-- actix-tls/src/connect/ssl/rustls.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/actix-tls/src/connect/ssl/openssl.rs b/actix-tls/src/connect/ssl/openssl.rs index 0006163d..b1c53f56 100755 --- a/actix-tls/src/connect/ssl/openssl.rs +++ b/actix-tls/src/connect/ssl/openssl.rs @@ -86,7 +86,7 @@ where fn call(&self, stream: Connection) -> Self::Future { trace!("SSL Handshake start for: {:?}", stream.host()); - let (io, stream) = stream.replace(()); + let (io, stream) = stream.replace_io(()); let host = stream.host(); let config = self @@ -123,7 +123,7 @@ where Ok(_) => { let stream = this.stream.take().unwrap(); trace!("SSL Handshake success: {:?}", stream.host()); - Poll::Ready(Ok(stream.replace(this.io.take().unwrap()).1)) + Poll::Ready(Ok(stream.replace_io(this.io.take().unwrap()).1)) } Err(e) => { trace!("SSL Handshake error: {:?}", e); diff --git a/actix-tls/src/connect/ssl/rustls.rs b/actix-tls/src/connect/ssl/rustls.rs index 9d7623ee..9bb5f80f 100755 --- a/actix-tls/src/connect/ssl/rustls.rs +++ b/actix-tls/src/connect/ssl/rustls.rs @@ -86,7 +86,7 @@ where fn call(&self, stream: Connection) -> Self::Future { trace!("SSL Handshake start for: {:?}", stream.host()); - let (io, stream) = stream.replace(()); + let (io, stream) = stream.replace_io(()); let host = DNSNameRef::try_from_ascii_str(stream.host()) .expect("rustls currently only handles hostname-based connections. See https://github.com/briansmith/webpki/issues/54"); ConnectAsyncExt { @@ -113,6 +113,6 @@ where let stream = ready!(Pin::new(&mut this.fut).poll(cx))?; let s = this.stream.take().unwrap(); trace!("SSL Handshake success: {:?}", s.host()); - Poll::Ready(Ok(s.replace(stream).1)) + Poll::Ready(Ok(s.replace_io(stream).1)) } }