diff --git a/nym-registration-client/src/lp_client/client.rs b/nym-registration-client/src/lp_client/client.rs index 6867e3545a..79fcf35ca8 100644 --- a/nym-registration-client/src/lp_client/client.rs +++ b/nym-registration-client/src/lp_client/client.rs @@ -39,7 +39,9 @@ use tracing::{debug, warn}; /// initiated, e.g. set `SO_MARK` on Linux so the connection is allowed /// through the VPN firewall during the connecting state. pub type LpDialer = Arc< - dyn Fn(SocketAddr) -> futures::future::BoxFuture<'static, std::result::Result> + dyn Fn( + SocketAddr, + ) -> futures::future::BoxFuture<'static, std::result::Result> + Send + Sync, >; @@ -249,17 +251,17 @@ where }; let mut stream = connect_result - .map_err(|_| LpClientError::TcpConnection { - address: self.gateway_lp_address.to_string(), - source: LpTransportError::ConnectionFailure(format!( - "Connection timeout after {:?}", - self.config.connect_timeout - )), - })? - .map_err(|source| LpClientError::TcpConnection { - address: self.gateway_lp_address.to_string(), - source, - })?; + .map_err(|_| LpClientError::TcpConnection { + address: self.gateway_lp_address.to_string(), + source: LpTransportError::ConnectionFailure(format!( + "Connection timeout after {:?}", + self.config.connect_timeout + )), + })? + .map_err(|source| LpClientError::TcpConnection { + address: self.gateway_lp_address.to_string(), + source, + })?; // Set TCP_NODELAY for low latency stream