ewhauser/zookeeper — pull request #21 by pbolduc (2014-03-18 21:20:59+00:00)
Title: Do not use DNS lookup when connection string uses IP address explicitly.

If the user configures to use IP address instead of a DNS name, do not resolve to other IP addresses on the computer. This resolves a couple of issues:

1. remote IP addresses may not be resolvable by DNS. Dns.GetHostEntry(string) will throw an exception in this case.

2. ZooKeeper may not be listening on all IP addresses of a server. This can be a problem with localhost (ie, development environment). The machine may have multiple network interfaces (LAN, WiFi, VMware, VirtualBox, etc). The user can force the use of the specified address by using IP addresses directly in the configuration.

This change also has extracted out the logic to select the returned addresses by address family. The original code only selects the IPv4 addresses. In the future, IPv6 should be supported.