From 598ffdbecf0c9a2662fade6c8a14af306cba054a Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 14 Apr 2024 21:46:33 +0200 Subject: [PATCH] tokio-xmpp: set resolve ip_strategy to Ipv4AndIpv6 The happy_eyeballs implementation should try to connect on both address families. The default of Ipv4thenIpv6 wouldn't query for AAAA if it got A. --- tokio-xmpp/src/starttls/happy_eyeballs.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tokio-xmpp/src/starttls/happy_eyeballs.rs b/tokio-xmpp/src/starttls/happy_eyeballs.rs index 0753088..2c41897 100644 --- a/tokio-xmpp/src/starttls/happy_eyeballs.rs +++ b/tokio-xmpp/src/starttls/happy_eyeballs.rs @@ -1,5 +1,7 @@ use super::error::{ConnectorError, Error}; -use hickory_resolver::{IntoName, TokioAsyncResolver}; +use hickory_resolver::{ + config::LookupIpStrategy, name_server::TokioConnectionProvider, IntoName, TokioAsyncResolver, +}; use log::debug; use std::net::SocketAddr; use tokio::net::TcpStream; @@ -13,7 +15,10 @@ pub async fn connect_to_host(domain: &str, port: u16) -> Result