diff options
Diffstat (limited to 'azalea-protocol/src/resolver.rs')
| -rwxr-xr-x | azalea-protocol/src/resolver.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/azalea-protocol/src/resolver.rs b/azalea-protocol/src/resolver.rs index 26baf2f9..dde5af3a 100755 --- a/azalea-protocol/src/resolver.rs +++ b/azalea-protocol/src/resolver.rs @@ -26,7 +26,9 @@ pub async fn resolve_address(address: &ServerAddress) -> Result<SocketAddr, Reso return Ok(SocketAddr::new(ip, address.port)); } - // we specify Cloudflare instead of the default resolver because trust_dns_resolver has an issue on Windows where it's really slow using the default resolver + // we specify Cloudflare instead of the default resolver because + // trust_dns_resolver has an issue on Windows where it's really slow using the + // default resolver let resolver = TokioAsyncResolver::tokio(ResolverConfig::cloudflare(), ResolverOpts::default()).unwrap(); @@ -35,7 +37,8 @@ pub async fn resolve_address(address: &ServerAddress) -> Result<SocketAddr, Reso .srv_lookup(format!("_minecraft._tcp.{}", address.host).as_str()) .await; - // if it resolves that means it's a redirect so we call resolve_address again with the new host + // if it resolves that means it's a redirect so we call resolve_address again + // with the new host if let Ok(redirect_result) = srv_redirect_result { let redirect_srv = redirect_result .iter() |
