1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-28 20:10:35 +02:00

Do not start default resolver immediately for default connector.

This commit is contained in:
Nikolay Kim
2019-04-12 12:28:18 -07:00
parent 21507d3da1
commit d3208bf7a8
4 changed files with 18 additions and 13 deletions

View File

@ -102,7 +102,7 @@ pub fn new_connector_factory<T: Address>(
pub fn default_connector<T: Address>(
) -> impl Service<Request = Connect<T>, Response = Connection<T, TcpStream>, Error = ConnectError>
+ Clone {
Resolver::new(start_default_resolver()).and_then(TcpConnector::new())
Resolver::default().and_then(TcpConnector::new())
}
/// Create connector service factory with default parameters
@ -112,5 +112,5 @@ pub fn default_connector_factory<T: Address>() -> impl NewService<
Error = ConnectError,
InitError = (),
> + Clone {
ResolverFactory::new(start_default_resolver()).and_then(TcpConnectorFactory::new())
ResolverFactory::default().and_then(TcpConnectorFactory::new())
}