Github user hanm commented on a diff in the pull request:

    https://github.com/apache/curator/pull/205#discussion_r127122870
  
    --- Diff: 
curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
 ---
    @@ -166,12 +166,26 @@ public static String 
configToConnectionString(QuorumVerifier data) throws Except
             StringBuilder sb = new StringBuilder();
             for ( QuorumPeer.QuorumServer server : 
data.getAllMembers().values() )
             {
    +            if ( server.clientAddr == null )
    +            {
    +                // Invalid client address configuration in zoo.cfg
    +                continue;
    +            }
                 if ( sb.length() != 0 )
                 {
                     sb.append(",");
                 }
    -            InetSocketAddress address = 
Objects.firstNonNull(server.clientAddr, server.addr);
    -            
sb.append(address.getAddress().getHostAddress()).append(":").append(address.getPort());
    +            InetAddress wildcardAddress = new 
InetSocketAddress(0).getAddress();
    --- End diff --
    
    I checked spec again, and I agree with what @Vile2539 commented - we should 
try clientAddr first and then fall back if necessary. So the code change in 
this pull request here looks good to me.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to