async fn resolve_host(host: &str, max_retries: usize) -> HashSet<SocketAddr> {
        for retry_count in 1..=max_retries {
            match Config::resolve_host_once(host).await {
                Ok(addresses) => return addresses,
                Err(_) => tracing::info!(?host, ?retry_count, "Retrying peer DNS resolution"),
            };
            tokio::time::sleep(crate::constants::DNS_LOOKUP_TIMEOUT).await;
        }

        HashSet::new()
    }
/// Resolves `host` into zero or more IP addresses, retrying up to
/// `max_retries` times.
///
/// If DNS continues to fail, returns an empty list of addresses.
Resolves `host` into zero or more IP addresses, retrying up to
`max_retries` times.

If DNS continues to fail, returns an empty list of addresses.
Resolves ` host ` into zero or more IP addresses retrying up to ` max_retries ` times . If DNS continues to fail returns an empty list of addresses .
async fn resolve_host(host: &str, max_retries: usize) -> HashSet<SocketAddr> {
        for retry_count in 1..=max_retries {
            match Config::resolve_host_once(host).await {
                Ok(addresses) => return addresses,
                Err(_) => tracing::info!(?host, ?retry_count, "Retrying peer DNS resolution"),
            };
            tokio::time::sleep(crate::constants::DNS_LOOKUP_TIMEOUT).await;
        }
        HashSet::new()
    }
async fn resolve_host ( host : & str , max_retries : usize ) -> HashSet < SocketAddr > { for retry_count in 1 ..= max_retries { match Config :: resolve_host_once ( host ) . await { Ok ( addresses ) => return addresses , Err ( _ ) => tracing :: info ! ( host retry_count " " ) , } ; tokio :: time :: sleep ( crate :: constants :: DNS_LOOKUP_TIMEOUT ) . await ; } HashSet :: new ( ) }
Resolves `host` into zero or more IP addresses, retrying up to
`max_retries` times.
Resolves ` host ` into zero or more IP addresses retrying up to ` max_retries ` times .
host
&str
max_retries
usize