go-zookeeper / zk

Native ZooKeeper client for Go
BSD 3-Clause "New" or "Revised" License
512 stars 130 forks source link

Connect DNS lookups hang indefinitely if there's no response #142

Closed MKrupauskas closed 3 months ago

MKrupauskas commented 3 months ago

The DNS host provider uses net.LookupHost which doesn't timeout (it just hangs indefinitely) even when the DNS resolver is unreachable.

The expected behavior would be that after 3 seconds (proposed but open to feedback) the DNS lookup times out and fails.

This will be done by using Resolver.LookupHost.