Github user cammckenzie commented on a diff in the pull request: https://github.com/apache/curator/pull/173#discussion_r89212147 --- Diff: curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java --- @@ -341,11 +342,41 @@ public Participant getLeader() throws Exception static Participant getLeader(CuratorFramework client, Collection<String> participantNodes) throws Exception { + Participant result = null; + if ( participantNodes.size() > 0 ) { - return participantForPath(client, participantNodes.iterator().next(), true); + Iterator<String> iter = participantNodes.iterator(); + while ( iter.hasNext() ) + { + + try + { + result = participantForPath(client, iter.next(), true); --- End diff -- Any other comments?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---