Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1684

Failure to update socket addresses on immedate connection

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.5.4, 3.6.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                arren Shevek
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: