anmolnar commented on a change in pull request #730: Zookeeper-3188: Improve 
resilience to network
URL: https://github.com/apache/zookeeper/pull/730#discussion_r260772663
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
 ##########
 @@ -332,7 +315,13 @@ public void testInitiateConnection(long sid) throws 
Exception {
         LOG.debug("Opening channel to server " + sid);
         Socket sock = new Socket();
         setSockOpts(sock);
-        sock.connect(self.getVotingView().get(sid).electionAddr, cnxTO);
+        InetSocketAddress address;
+        try {
 
 Review comment:
   This logic is quite common across the board. It would be better located in a 
parent or helper class.
   For example in the `MultipleAddresses` class something like 
`getReachableOrOne`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to