zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phunt <...@git.apache.org>
Subject [GitHub] zookeeper pull request #430: ZOOKEEPER-2893. very poor choice of logging if ...
Date Thu, 14 Dec 2017 00:30:58 GMT
Github user phunt commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/430#discussion_r156825456
  
    --- Diff: src/java/main/org/apache/zookeeper/ClientCnxn.java ---
    @@ -1041,6 +1041,8 @@ private void sendPing() {
     
             private InetSocketAddress rwServerAddress = null;
     
    +        private InetSocketAddress serverAddress = null;
    --- End diff --
    
    This seems kinda bogus to me - why push this up to a field. Can't we determine the server
address in "run" method, as a local variable, and call startConnect with that as an argument?
That seems like an improvement to startConnect call at the same time. What do you think @anmolnar
, does that make sense or am I missing something?


---

Mime
View raw message