diff --git a/src/ctx.rs b/src/ctx.rs index c102ab9..ef46508 100644 --- a/src/ctx.rs +++ b/src/ctx.rs @@ -10,6 +10,8 @@ use rustls::ServerConfig; use tokio::net::UdpSocket; use tokio::sync::broadcast; +type InflightMap = HashMap<(String, QueryType), broadcast::Sender>>; + use crate::blocklist::BlocklistStore; use crate::buffer::BytePacketBuffer; use crate::cache::{DnsCache, DnssecStatus}; @@ -55,7 +57,7 @@ pub struct ServerCtx { pub upstream_mode: UpstreamMode, pub root_hints: Vec, pub srtt: RwLock, - pub inflight: Mutex>>>, + pub inflight: Mutex, pub dnssec_enabled: bool, pub dnssec_strict: bool, } @@ -430,7 +432,7 @@ fn is_special_use_domain(qname: &str) -> bool { } struct InflightGuard<'a> { - inflight: &'a Mutex>>>, + inflight: &'a Mutex, key: (String, QueryType), }