-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I'd like to use ProxyProtocolAcceptor to wrap a tokio TcpListener but it seems that this is not supported yet?
hyper-server = { version = "0.6.0", features = ["proxy-protocol"] }
Compiling hyper-server v0.6.0
error[E0308]: mismatched types
--> /home/ii64/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-server-0.6.0/src/proxy_protocol/mod.rs:333:13
|
332 | ProxyProtocolAcceptorFuture::new(
| -------------------------------- arguments to this function are incorrect
333 | timeout(self.parsing_timeout, future),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `dyn futures_util::Future`, found future
|
= note: expected struct `tokio::time::Timeout<Pin<Box<dyn futures_util::Future<Output = Result<(I, Option<std::net::SocketAddr>), std::io::Error>> + Send>>>`
found struct `tokio::time::Timeout<Pin<Box<impl futures_util::Future<Output = Result<(I, Option<std::net::SocketAddr>), std::io::Error>>>>>`
= help: you can box the `impl futures_util::Future<Output = Result<(I, Option<std::net::SocketAddr>), std::io::Error>>` to coerce it to `Box<dyn futures_util::Future<Output = Result<(I, Option<std::net::SocketAddr>), std::io::Error>> + Send>`, but you'll have to change the expected type as well
note: associated function defined here
--> /home/ii64/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-server-0.6.0/src/proxy_protocol/future.rs:40:19
|
40 | pub(crate) fn new(future: Timeout<F>, acceptor: A, service: S) -> Self {
| ^^^ ------------------
For more information about this error, try `rustc --explain E0308`.
error: could not compile `hyper-server` (lib) due to 1 previous error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels