@@ -41,6 +41,7 @@ use super::node::{InternalKnownNode, NodeAddr, ResolvedContactPoint};
41
41
pub ( crate ) struct MetadataReader {
42
42
connection_config : ConnectionConfig ,
43
43
keepalive_interval : Option < Duration > ,
44
+ hostname_resolution_timeout : Option < Duration > ,
44
45
45
46
control_connection_endpoint : UntranslatedEndpoint ,
46
47
control_connection : NodeConnectionPool ,
@@ -470,6 +471,7 @@ impl MetadataReader {
470
471
#[ allow( clippy:: too_many_arguments) ]
471
472
pub ( crate ) async fn new (
472
473
initial_known_nodes : Vec < InternalKnownNode > ,
474
+ hostname_resolution_timeout : Option < Duration > ,
473
475
control_connection_repair_requester : broadcast:: Sender < ( ) > ,
474
476
mut connection_config : ConnectionConfig ,
475
477
keepalive_interval : Option < Duration > ,
@@ -503,13 +505,15 @@ impl MetadataReader {
503
505
control_connection_endpoint. clone ( ) ,
504
506
connection_config. clone ( ) ,
505
507
keepalive_interval,
508
+ hostname_resolution_timeout,
506
509
control_connection_repair_requester. clone ( ) ,
507
510
) ;
508
511
509
512
Ok ( MetadataReader {
510
513
control_connection_endpoint,
511
514
control_connection,
512
515
keepalive_interval,
516
+ hostname_resolution_timeout,
513
517
connection_config,
514
518
known_peers : initial_peers
515
519
. into_iter ( )
@@ -630,6 +634,7 @@ impl MetadataReader {
630
634
self . control_connection_endpoint . clone ( ) ,
631
635
self . connection_config . clone ( ) ,
632
636
self . keepalive_interval ,
637
+ self . hostname_resolution_timeout ,
633
638
self . control_connection_repair_requester . clone ( ) ,
634
639
) ;
635
640
@@ -730,6 +735,7 @@ impl MetadataReader {
730
735
self . control_connection_endpoint . clone ( ) ,
731
736
self . connection_config . clone ( ) ,
732
737
self . keepalive_interval ,
738
+ self . hostname_resolution_timeout ,
733
739
self . control_connection_repair_requester . clone ( ) ,
734
740
) ;
735
741
}
@@ -741,11 +747,13 @@ impl MetadataReader {
741
747
endpoint : UntranslatedEndpoint ,
742
748
connection_config : ConnectionConfig ,
743
749
keepalive_interval : Option < Duration > ,
750
+ hostname_resolution_timeout : Option < Duration > ,
744
751
refresh_requester : broadcast:: Sender < ( ) > ,
745
752
) -> NodeConnectionPool {
746
753
let pool_config = PoolConfig {
747
754
connection_config,
748
755
keepalive_interval,
756
+ hostname_resolution_timeout,
749
757
750
758
// We want to have only one connection to receive events from
751
759
pool_size : PoolSize :: PerHost ( NonZeroUsize :: new ( 1 ) . unwrap ( ) ) ,
0 commit comments