@@ -41,6 +41,7 @@ use super::node::{InternalKnownNode, NodeAddr, ResolvedContactPoint};
4141pub ( crate ) struct MetadataReader {
4242 connection_config : ConnectionConfig ,
4343 keepalive_interval : Option < Duration > ,
44+ hostname_resolution_timeout : Option < Duration > ,
4445
4546 control_connection_endpoint : UntranslatedEndpoint ,
4647 control_connection : NodeConnectionPool ,
@@ -470,6 +471,7 @@ impl MetadataReader {
470471 #[ allow( clippy:: too_many_arguments) ]
471472 pub ( crate ) async fn new (
472473 initial_known_nodes : Vec < InternalKnownNode > ,
474+ hostname_resolution_timeout : Option < Duration > ,
473475 control_connection_repair_requester : broadcast:: Sender < ( ) > ,
474476 mut connection_config : ConnectionConfig ,
475477 keepalive_interval : Option < Duration > ,
@@ -503,13 +505,15 @@ impl MetadataReader {
503505 control_connection_endpoint. clone ( ) ,
504506 connection_config. clone ( ) ,
505507 keepalive_interval,
508+ hostname_resolution_timeout,
506509 control_connection_repair_requester. clone ( ) ,
507510 ) ;
508511
509512 Ok ( MetadataReader {
510513 control_connection_endpoint,
511514 control_connection,
512515 keepalive_interval,
516+ hostname_resolution_timeout,
513517 connection_config,
514518 known_peers : initial_peers
515519 . into_iter ( )
@@ -630,6 +634,7 @@ impl MetadataReader {
630634 self . control_connection_endpoint . clone ( ) ,
631635 self . connection_config . clone ( ) ,
632636 self . keepalive_interval ,
637+ self . hostname_resolution_timeout ,
633638 self . control_connection_repair_requester . clone ( ) ,
634639 ) ;
635640
@@ -730,6 +735,7 @@ impl MetadataReader {
730735 self . control_connection_endpoint . clone ( ) ,
731736 self . connection_config . clone ( ) ,
732737 self . keepalive_interval ,
738+ self . hostname_resolution_timeout ,
733739 self . control_connection_repair_requester . clone ( ) ,
734740 ) ;
735741 }
@@ -741,11 +747,13 @@ impl MetadataReader {
741747 endpoint : UntranslatedEndpoint ,
742748 connection_config : ConnectionConfig ,
743749 keepalive_interval : Option < Duration > ,
750+ hostname_resolution_timeout : Option < Duration > ,
744751 refresh_requester : broadcast:: Sender < ( ) > ,
745752 ) -> NodeConnectionPool {
746753 let pool_config = PoolConfig {
747754 connection_config,
748755 keepalive_interval,
756+ hostname_resolution_timeout,
749757
750758 // We want to have only one connection to receive events from
751759 pool_size : PoolSize :: PerHost ( NonZeroUsize :: new ( 1 ) . unwrap ( ) ) ,
0 commit comments