1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-02-17 14:43:31 +01:00

fix rustls acceptor

This commit is contained in:
Nikolay Kim 2019-11-19 18:54:36 +06:00
parent 3bf83c1d98
commit d3c5518646
2 changed files with 11 additions and 6 deletions

View File

@ -25,4 +25,5 @@ rustls = ["tokio-rustls"]
tokio-io = "0.2.0-alpha.6" tokio-io = "0.2.0-alpha.6"
tokio-net = "0.2.0-alpha.6" tokio-net = "0.2.0-alpha.6"
tokio-openssl = { version = "0.4.0-alpha.6", optional = true } tokio-openssl = { version = "0.4.0-alpha.6", optional = true }
tokio-rustls = { version = "0.12.0-alpha.8", optional = true } #tokio-rustls = { version = "0.12.0-alpha.8", optional = true }
tokio-rustls = { git = "https://github.com/quininer/tokio-rustls.git", branch = "tokio-0.2", optional = true }

View File

@ -111,10 +111,14 @@ impl<T: AsyncRead + AsyncWrite + Unpin, P> Future for RustlsAcceptorServiceFut<T
fn poll(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Self::Output> { fn poll(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Self::Output> {
let this = self.get_mut(); let this = self.get_mut();
let params = this.params.take().unwrap();
Poll::Ready( let res = futures::ready!(Pin::new(&mut this.fut).poll(cx));
futures::ready!(Pin::new(&mut this.fut).poll(cx)) match res {
.map(move |io| Io::from_parts(io, params, Protocol::Unknown)), Ok(io) => {
) let params = this.params.take().unwrap();
Poll::Ready(Ok(Io::from_parts(io, params, Protocol::Unknown)))
}
Err(e) => Poll::Ready(Err(e)),
}
} }
} }