Tuned HTTPs client for DoH.

This commit is contained in:
Revertron
2025-10-29 15:59:19 +01:00
parent 0835df14ac
commit bb3a33c103
+3 -2
View File
@@ -482,9 +482,10 @@ impl HttpsDnsClient {
let agent_config = Agent::config_builder() let agent_config = Agent::config_builder()
.user_agent(&client_name) .user_agent(&client_name)
.timeout_global(Some(Duration::from_secs(3))) .timeout_global(Some(Duration::from_secs(5)))
.max_idle_connections_per_host(4) .max_idle_connections_per_host(8)
.max_idle_connections(16) .max_idle_connections(16)
.max_idle_age(Duration::from_secs(300))
.build(); .build();
let agent = Agent::with_parts(agent_config, DefaultConnector::default(), BootstrapResolver::new(servers)); let agent = Agent::with_parts(agent_config, DefaultConnector::default(), BootstrapResolver::new(servers));
Self { agent, seq: AtomicU16::new(rand::random::<u16>()) } Self { agent, seq: AtomicU16::new(rand::random::<u16>()) }