-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1766/#review1904
-----------------------------------------------------------



src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java
<https://reviews.apache.org/r/1766/#comment4386>

    Based on Camille's comments, this needs to change to roughly this:
    
           try {
                boolean immediateConnect = sock.connect(addr);
                sockKey = sock.register(selector, SelectionKey.OP_CONNECT);
                if (immediateConnect) {
                    sendThread.primeConnection();
                }
            } catch (IOException e) {
                LOG.error("Unable to open socket to " + addr);
                sock.close();
    
    I have been travelling which has made it hard to produce a coherent patch.  
Let me do that right now.


- Ted


On 2011-09-14 22:17:36, Ted Dunning wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/1766/
> -----------------------------------------------------------
> 
> (Updated 2011-09-14 22:17:36)
> 
> 
> Review request for zookeeper.
> 
> 
> Summary
> -------
> 
> When connect throws an exception, we can leak descriptors.
> 
> 
> Diffs
> -----
> 
>   src/java/main/org/apache/zookeeper/ClientCnxn.java 9ea59ca 
>   src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04 
>   src/java/main/org/apache/zookeeper/server/DataTree.java 0690ce9 
> 
> Diff: https://reviews.apache.org/r/1766/diff
> 
> 
> Testing
> -------
> 
> See test program and description on 
> https://issues.apache.org/jira/browse/ZOOKEEPER-1174
> 
> 
> Thanks,
> 
> Ted
> 
>

Reply via email to