aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol')
-rw-r--r--azalea-protocol/Cargo.toml2
-rw-r--r--azalea-protocol/src/resolver.rs12
2 files changed, 5 insertions, 9 deletions
diff --git a/azalea-protocol/Cargo.toml b/azalea-protocol/Cargo.toml
index 6e264da8..d1215a92 100644
--- a/azalea-protocol/Cargo.toml
+++ b/azalea-protocol/Cargo.toml
@@ -46,7 +46,7 @@ thiserror.workspace = true
tokio = { workspace = true, features = ["io-util", "net", "macros"] }
tokio-util = { workspace = true, features = ["codec"] }
tracing.workspace = true
-hickory-resolver = { workspace = true, features = ["tokio"] }
+hickory-resolver = { workspace = true, features = ["tokio", "system-config"] }
uuid.workspace = true
crc32fast = { workspace = true, optional = true }
diff --git a/azalea-protocol/src/resolver.rs b/azalea-protocol/src/resolver.rs
index c01a485b..4cd2faad 100644
--- a/azalea-protocol/src/resolver.rs
+++ b/azalea-protocol/src/resolver.rs
@@ -3,9 +3,7 @@
use std::net::{IpAddr, SocketAddr};
use async_recursion::async_recursion;
-use hickory_resolver::{
- Name, TokioResolver, config::ResolverConfig, name_server::TokioConnectionProvider,
-};
+use hickory_resolver::{Name, TokioResolver, name_server::TokioConnectionProvider};
use thiserror::Error;
use crate::ServerAddress;
@@ -31,11 +29,9 @@ pub async fn resolve_address(address: &ServerAddress) -> Result<SocketAddr, Reso
// we specify Cloudflare instead of the default resolver because
// hickory_resolver has an issue on Windows where it's really slow using the
// default resolver
- let resolver = TokioResolver::builder_with_config(
- ResolverConfig::cloudflare(),
- TokioConnectionProvider::default(),
- )
- .build();
+ let resolver = TokioResolver::builder(TokioConnectionProvider::default())
+ .unwrap()
+ .build();
// first, we do a srv lookup for _minecraft._tcp.<host>
let srv_redirect_result = resolver