Github user anmolnar commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/451#discussion_r191087859
--- Diff: src/java/main/org/apache/zookeeper/client/HostProvider.java ---
@@ -53,7 +54,7 @@
* @param spinDelay
* Milliseconds to wait if all hosts have been tried once.
*/
- public InetSocketAddress next(long spinDelay);
+ public InetSocketAddress next(long spinDelay) throws
UnknownHostException;
--- End diff --
That's actually a great idea. I've tried that and `socket.connect()` will
throw an IOException eventually of the address is not resolved. Which means
basically that the same retry logic applies in the caller, it's just not next()
that catches the error. I'll update the patch.
Once this one is finally merged, I'll take a look at 3.5/master branches,
because I think we should be consistent with this across the board.
---