From aa246571a7d038003f1d7d102a979e6914f84865 Mon Sep 17 00:00:00 2001 From: Revertron Date: Thu, 3 Nov 2022 17:55:32 +0100 Subject: [PATCH] Fixed unimportant warning, and changed some constants in DoH client. --- Cargo.toml | 2 +- src/dns/client.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7e0c8df..c858c34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "alfis" -version = "0.8.3" +version = "0.8.4" authors = ["Revertron "] edition = "2021" build = "build.rs" diff --git a/src/dns/client.rs b/src/dns/client.rs index 64713d2..5d104ac 100644 --- a/src/dns/client.rs +++ b/src/dns/client.rs @@ -7,6 +7,7 @@ use std::marker::{Send, Sync}; use std::net::{SocketAddr, TcpStream, ToSocketAddrs, UdpSocket}; #[cfg(feature = "doh")] use std::net::IpAddr; +#[cfg(feature = "doh")] use std::num::NonZeroUsize; use std::sync::atomic::{AtomicUsize, Ordering, AtomicBool}; use std::sync::mpsc::{channel, Sender}; @@ -406,8 +407,8 @@ impl HttpsDnsClient { let agent = ureq::AgentBuilder::new() .user_agent(&client_name) - .timeout(std::time::Duration::from_secs(5)) - .max_idle_connections_per_host(2) + .timeout(std::time::Duration::from_secs(3)) + .max_idle_connections_per_host(4) .max_idle_connections(16) .resolver(move |addr: &str| { let addr = match addr.find(':') {