diff options
| author | mat <github@matdoes.dev> | 2022-12-08 18:39:35 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-12-08 18:39:35 -0600 |
| commit | 70e2dfed16da8d5130460ea15b47701e622f4a9f (patch) | |
| tree | 41f670baf3a05ed180880ec2a11d8e5f6a1a1599 /azalea-protocol/src/resolver.rs | |
| parent | f2076daba5cfcce81399b075ba9258fbdc2012fa (diff) | |
| download | azalea-drasl-70e2dfed16da8d5130460ea15b47701e622f4a9f.tar.xz | |
wrap_comments = true
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() |
