dns.resolver.resolve() does not look at the normal chain of things (/etc/hosts, etc when resolving a DNS name so there can be cases when things like localhost do not resolve, or when a user configured something in /etc/hosts would not work.
By using socket.getaddrinfo we can support IPv4/IPv6 as well as have the lookup go through the normal chain of things.
@ross added some more bits after your approval. Mostly just adding IPv6 + Logging to the docker-compose (this was super helpful for development) and then adding a timeout
Follow up to #27 which is about #24 #25
dns.resolver.resolve()
does not look at the normal chain of things (/etc/hosts
,etc
when resolving a DNS name so there can be cases when things likelocalhost
do not resolve, or when a user configured something in/etc/hosts
would not work.By using
socket.getaddrinfo
we can support IPv4/IPv6 as well as have the lookup go through the normal chain of things.