mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 22:51:07 +01:00
fix rustls acceptor
This commit is contained in:
parent
3bf83c1d98
commit
d3c5518646
@ -25,4 +25,5 @@ rustls = ["tokio-rustls"]
|
||||
tokio-io = "0.2.0-alpha.6"
|
||||
tokio-net = "0.2.0-alpha.6"
|
||||
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 }
|
||||
|
@ -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> {
|
||||
let this = self.get_mut();
|
||||
let params = this.params.take().unwrap();
|
||||
Poll::Ready(
|
||||
futures::ready!(Pin::new(&mut this.fut).poll(cx))
|
||||
.map(move |io| Io::from_parts(io, params, Protocol::Unknown)),
|
||||
)
|
||||
|
||||
let res = futures::ready!(Pin::new(&mut this.fut).poll(cx));
|
||||
match res {
|
||||
Ok(io) => {
|
||||
let params = this.params.take().unwrap();
|
||||
Poll::Ready(Ok(Io::from_parts(io, params, Protocol::Unknown)))
|
||||
}
|
||||
Err(e) => Poll::Ready(Err(e)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user