From c9bb2116feb8ac6c6c40a7f8f63e03dff8c973d5 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sun, 3 Feb 2019 10:50:29 -0800 Subject: [PATCH] update actix-utils --- Cargo.toml | 4 ++++ src/client/connector.rs | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a039b455..ff19a4f9 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 fea9b9c0..8e3c4b5a 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()