zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanm <...@git.apache.org>
Subject [GitHub] zookeeper pull request #173: ZOOKEEPER-2691: recreateSocketAddresses may rec...
Date Mon, 13 Feb 2017 20:46:22 GMT
Github user hanm commented on a diff in the pull request:

    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java ---
    @@ -159,7 +159,7 @@ public QuorumServer(long id, String hostname,
             public void recreateSocketAddresses() {
                 InetAddress address = null;
                 try {
    -                address = InetAddress.getByName(this.hostname);
    +                address = getReachableAddress(this.hostname, 2000);
    --- End diff --
    Instead of hardcoding 2000 here, we can have a constant variable represent the timeout
value at the beginning of QuorumPeer.java. [QuorumCnxManager](https://github.com/apache/zookeeper/blob/master/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java)
is a good example on how it uses constants.

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message