You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Shevek (JIRA)" <ji...@apache.org> on 2013/04/05 22:45:16 UTC

[jira] [Created] (ZOOKEEPER-1684) Failure to update socket addresses on immedate connection

Shevek created ZOOKEEPER-1684:
---------------------------------

             Summary: Failure to update socket addresses on immedate connection
                 Key: ZOOKEEPER-1684
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1684
             Project: ZooKeeper
          Issue Type: Bug
            Reporter: Shevek


I quote:

void registerAndConnect(SocketChannel sock, InetSocketAddress addr)
throws IOException {
sockKey = sock.register(selector, SelectionKey.OP_CONNECT);
boolean immediateConnect = sock.connect(addr);
if (immediateConnect)
{ sendThread.primeConnection(); }

}

In the immediate case, there are several bugs:

a) updateSocketAddresses() is never called, as it is when the select-loop in doTransport(). This means that clientCnxnSocket.getRemoteSocketAddress() will return null for the lifetime of this socket?
b) CONNECT still in the interest set for the socket.
c) updateLastSendAndHeard() is never called either.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira