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:
@ -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())
|
||||
}
|
||||
|
Reference in New Issue
Block a user