diff --git a/Cargo.toml b/Cargo.toml index a039b4557..ff19a4f96 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,3 +80,7 @@ actix-server = "0.2" actix-http-test = { path="test-server" } env_logger = "0.6" serde_derive = "1.0" + +[patch.crates-io] +actix-utils = { git = "https://github.com/actix/actix-net.git" } +actix-service = { git = "https://github.com/actix/actix-net.git" } diff --git a/src/client/connector.rs b/src/client/connector.rs index fea9b9c0a..8e3c4b5ae 100644 --- a/src/client/connector.rs +++ b/src/client/connector.rs @@ -2,7 +2,7 @@ use std::time::Duration; use actix_codec::{AsyncRead, AsyncWrite}; use actix_connector::{Resolver, TcpConnector}; -use actix_service::{Service, ServiceExt}; +use actix_service::{Apply, Service, ServiceExt}; use actix_utils::timeout::{TimeoutError, TimeoutService}; use trust_dns_resolver::config::{ResolverConfig, ResolverOpts}; @@ -142,8 +142,8 @@ impl Connector { > + Clone { #[cfg(not(feature = "ssl"))] { - let connector = TimeoutService::new( - self.timeout, + let connector = Apply::new( + TimeoutService::new(self.timeout), self.resolver.map_err(ConnectorError::from).and_then( TcpConnector::default() .from_err() @@ -167,8 +167,8 @@ impl Connector { } #[cfg(feature = "ssl")] { - let ssl_service = TimeoutService::new( - self.timeout, + let ssl_service = Apply::new( + TimeoutService::new(self.timeout), self.resolver .clone() .map_err(ConnectorError::from) @@ -196,8 +196,8 @@ impl Connector { TimeoutError::Timeout => ConnectorError::Timeout, }); - let tcp_service = TimeoutService::new( - self.timeout, + let tcp_service = Apply::new( + TimeoutService::new(self.timeout), self.resolver.map_err(ConnectorError::from).and_then( TcpConnector::default() .from_err()