1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-30 05:21:09 +00:00

update actix-utils

This commit is contained in:
Nikolay Kim 2019-02-03 10:50:29 -08:00
parent e70c7f2a5d
commit c9bb2116fe
2 changed files with 11 additions and 7 deletions

View file

@ -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" }

View file

@ -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()