zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cami...@apache.org
Subject svn commit: r1177043 - /zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java
Date Wed, 28 Sep 2011 20:17:49 GMT
Author: camille
Date: Wed Sep 28 20:17:49 2011
New Revision: 1177043

URL: http://svn.apache.org/viewvc?rev=1177043&view=rev
Log:
ZOOKEEPER-1174. FD leak when network unreachable (Ted Dunning via camille)

Modified:
    zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java

Modified: zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java?rev=1177043&r1=1177042&r2=1177043&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java
(original)
+++ zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java
Wed Sep 28 20:17:49 2011
@@ -185,8 +185,8 @@ public class ClientCnxnSocketNIO extends
         sock.socket().setSoLinger(false, -1);
         sock.socket().setTcpNoDelay(true);
         try {
-            boolean immediateConnect = sock.connect(addr);
             sockKey = sock.register(selector, SelectionKey.OP_CONNECT);
+            boolean immediateConnect = sock.connect(addr);            
             if (immediateConnect) {
                 sendThread.primeConnection();
             }



Mime
View raw message