@@ -39,6 +39,7 @@ use super::node::{InternalKnownNode, NodeAddr, ResolvedContactPoint};
39
39
pub ( crate ) struct MetadataReader {
40
40
connection_config : ConnectionConfig ,
41
41
keepalive_interval : Option < Duration > ,
42
+ hostname_resolution_timeout : Option < Duration > ,
42
43
43
44
control_connection_endpoint : UntranslatedEndpoint ,
44
45
control_connection : NodeConnectionPool ,
@@ -452,6 +453,7 @@ impl MetadataReader {
452
453
#[ allow( clippy:: too_many_arguments) ]
453
454
pub ( crate ) async fn new (
454
455
initial_known_nodes : Vec < InternalKnownNode > ,
456
+ hostname_resolution_timeout : Option < Duration > ,
455
457
control_connection_repair_requester : broadcast:: Sender < ( ) > ,
456
458
mut connection_config : ConnectionConfig ,
457
459
keepalive_interval : Option < Duration > ,
@@ -485,13 +487,15 @@ impl MetadataReader {
485
487
control_connection_endpoint. clone ( ) ,
486
488
connection_config. clone ( ) ,
487
489
keepalive_interval,
490
+ hostname_resolution_timeout,
488
491
control_connection_repair_requester. clone ( ) ,
489
492
) ;
490
493
491
494
Ok ( MetadataReader {
492
495
control_connection_endpoint,
493
496
control_connection,
494
497
keepalive_interval,
498
+ hostname_resolution_timeout,
495
499
connection_config,
496
500
known_peers : initial_peers
497
501
. into_iter ( )
@@ -612,6 +616,7 @@ impl MetadataReader {
612
616
self . control_connection_endpoint . clone ( ) ,
613
617
self . connection_config . clone ( ) ,
614
618
self . keepalive_interval ,
619
+ self . hostname_resolution_timeout ,
615
620
self . control_connection_repair_requester . clone ( ) ,
616
621
) ;
617
622
@@ -712,6 +717,7 @@ impl MetadataReader {
712
717
self . control_connection_endpoint . clone ( ) ,
713
718
self . connection_config . clone ( ) ,
714
719
self . keepalive_interval ,
720
+ self . hostname_resolution_timeout ,
715
721
self . control_connection_repair_requester . clone ( ) ,
716
722
) ;
717
723
}
@@ -723,11 +729,13 @@ impl MetadataReader {
723
729
endpoint : UntranslatedEndpoint ,
724
730
connection_config : ConnectionConfig ,
725
731
keepalive_interval : Option < Duration > ,
732
+ hostname_resolution_timeout : Option < Duration > ,
726
733
refresh_requester : broadcast:: Sender < ( ) > ,
727
734
) -> NodeConnectionPool {
728
735
let pool_config = PoolConfig {
729
736
connection_config,
730
737
keepalive_interval,
738
+ hostname_resolution_timeout,
731
739
732
740
// We want to have only one connection to receive events from
733
741
pool_size : PoolSize :: PerHost ( NonZeroUsize :: new ( 1 ) . unwrap ( ) ) ,
0 commit comments