diff options
| author | Ubuntu <github@matdoes.dev> | 2022-12-09 15:13:14 +0000 |
|---|---|---|
| committer | Ubuntu <github@matdoes.dev> | 2022-12-09 15:13:14 +0000 |
| commit | ca00dbab12ab7de0bba462b9814b9f491b23da69 (patch) | |
| tree | 560bd906d9ca1fcb822290286e9bf5990826163a /azalea-protocol/src/resolver.rs | |
| parent | f0097612473d20ebac21e8ae5eba32bf32c2fe42 (diff) | |
| parent | 70e2dfed16da8d5130460ea15b47701e622f4a9f (diff) | |
| download | azalea-drasl-ca00dbab12ab7de0bba462b9814b9f491b23da69.tar.xz | |
Merge branch 'main' of https://github.com/mat-1/azalea into main
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() |
