You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the HttpClient I observe the same 10 second delay resolving the DNS name as described above for the UDP class. The same workaround is effective (making my own call to gethostbyname with the NSAPI_IPv4 enum option).
Both of these related DNS problems (in the UDP and HTTP classes) occur 100% reliably on GIGA devices attached to the AT&T Fiber Optic network which supports both IPV4 and IPV6.
When the DNS server response includes both IPV4 and IPV6 addresses gethostbyname with the NSAPI_UNSPEC hangs for 10 seconds, times out and then is immediately successful returning an IPV4 address. The problem occurs both when using a DNS name like "pool.ntp.org" which returns multiple server IPs as well as simple single server names like "adventure-labs.com".
MbedUDP::beginPacket() hangs for over 10 seconds if IPV6 responses are received.
It is believed this is caused by gethostbyname() within SocketHelpers.cpp passing NSAPI_UNSPEC as the desired response type. Overriding with NSAPI_IPv4 eliminates the problem. Full details can be found here https://forum.arduino.cc/t/dns-resolution-hangs-udp-for-10-sec-on-ipv6-networks/1349444
The text was updated successfully, but these errors were encountered: