@@ -39,6 +39,7 @@ use super::node::{InternalKnownNode, NodeAddr, ResolvedContactPoint};
3939pub ( crate ) struct MetadataReader {
4040 connection_config : ConnectionConfig ,
4141 keepalive_interval : Option < Duration > ,
42+ hostname_resolution_timeout : Option < Duration > ,
4243
4344 control_connection_endpoint : UntranslatedEndpoint ,
4445 control_connection : NodeConnectionPool ,
@@ -452,6 +453,7 @@ impl MetadataReader {
452453 #[ allow( clippy:: too_many_arguments) ]
453454 pub ( crate ) async fn new (
454455 initial_known_nodes : Vec < InternalKnownNode > ,
456+ hostname_resolution_timeout : Option < Duration > ,
455457 control_connection_repair_requester : broadcast:: Sender < ( ) > ,
456458 mut connection_config : ConnectionConfig ,
457459 keepalive_interval : Option < Duration > ,
@@ -485,13 +487,15 @@ impl MetadataReader {
485487 control_connection_endpoint. clone ( ) ,
486488 connection_config. clone ( ) ,
487489 keepalive_interval,
490+ hostname_resolution_timeout,
488491 control_connection_repair_requester. clone ( ) ,
489492 ) ;
490493
491494 Ok ( MetadataReader {
492495 control_connection_endpoint,
493496 control_connection,
494497 keepalive_interval,
498+ hostname_resolution_timeout,
495499 connection_config,
496500 known_peers : initial_peers
497501 . into_iter ( )
@@ -612,6 +616,7 @@ impl MetadataReader {
612616 self . control_connection_endpoint . clone ( ) ,
613617 self . connection_config . clone ( ) ,
614618 self . keepalive_interval ,
619+ self . hostname_resolution_timeout ,
615620 self . control_connection_repair_requester . clone ( ) ,
616621 ) ;
617622
@@ -712,6 +717,7 @@ impl MetadataReader {
712717 self . control_connection_endpoint . clone ( ) ,
713718 self . connection_config . clone ( ) ,
714719 self . keepalive_interval ,
720+ self . hostname_resolution_timeout ,
715721 self . control_connection_repair_requester . clone ( ) ,
716722 ) ;
717723 }
@@ -723,11 +729,13 @@ impl MetadataReader {
723729 endpoint : UntranslatedEndpoint ,
724730 connection_config : ConnectionConfig ,
725731 keepalive_interval : Option < Duration > ,
732+ hostname_resolution_timeout : Option < Duration > ,
726733 refresh_requester : broadcast:: Sender < ( ) > ,
727734 ) -> NodeConnectionPool {
728735 let pool_config = PoolConfig {
729736 connection_config,
730737 keepalive_interval,
738+ hostname_resolution_timeout,
731739
732740 // We want to have only one connection to receive events from
733741 pool_size : PoolSize :: PerHost ( NonZeroUsize :: new ( 1 ) . unwrap ( ) ) ,
0 commit comments