GitHub user llowrey opened a pull request: https://github.com/apache/kafka/pull/1044
KAFKA-3378 Fix for instantly connecting SocketChannels. Added OP_WRITE interestOp when channel connects instantly (socketChannel.connect(address) returns true... even in non-blocking mode). This allows the SocketChannel to be ready on the next call to select(). The poll method was modified to detect this case (OP_CONNECT && OP_WRITE while not key.isConnectable()) to complete the connection setup as if the channel had not connected instantly. You can merge this pull request into a Git repository by running: $ git pull https://github.com/llowrey/kafka 0.9.0 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1044.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1044 ---- commit 79f96114e0cc8a2fdadfa6738cf4c666a8c42e96 Author: Larkin Lowrey <llow...@gmail.com> Date: 2016-03-10T18:16:06Z Fix for instantly connecting SocketChannels. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---