mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-16 20:04:39 +00:00
tokio 1.0: update to new tokio-openssl interface
connect/accept are now happening on pinned SslStreams Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
d94119efc8
commit
c99f950310
@ -65,7 +65,7 @@ impl RestServer {
|
||||
}
|
||||
}
|
||||
|
||||
impl tower_service::Service<&tokio_openssl::SslStream<tokio::net::TcpStream>> for RestServer {
|
||||
impl tower_service::Service<&Pin<Box<tokio_openssl::SslStream<tokio::net::TcpStream>>>> for RestServer {
|
||||
type Response = ApiService;
|
||||
type Error = Error;
|
||||
type Future = Pin<Box<dyn Future<Output = Result<ApiService, Error>> + Send>>;
|
||||
@ -74,7 +74,7 @@ impl tower_service::Service<&tokio_openssl::SslStream<tokio::net::TcpStream>> fo
|
||||
Poll::Ready(Ok(()))
|
||||
}
|
||||
|
||||
fn call(&mut self, ctx: &tokio_openssl::SslStream<tokio::net::TcpStream>) -> Self::Future {
|
||||
fn call(&mut self, ctx: &Pin<Box<tokio_openssl::SslStream<tokio::net::TcpStream>>>) -> Self::Future {
|
||||
match ctx.get_ref().peer_addr() {
|
||||
Err(err) => {
|
||||
future::err(format_err!("unable to get peer address - {}", err)).boxed()
|
||||
|
Loading…
Reference in New Issue
Block a user