if issue when onRead has no attached

This commit is contained in:
Rob Austin
2014-12-12 15:48:59 +00:00
parent 6c0e6de3bb
commit 17b67c30cc
@@ -639,6 +639,12 @@ final class TcpReplicator extends AbstractChannelReplicator implements Closeable
final SocketChannel socketChannel = (SocketChannel) key.channel();
final Attached attached = (Attached) key.attachment();
if (attached == null) {
LOG.info("Closing connection " + socketChannel + ", nothing attached");
socketChannel.close();
return;
}
try {
int len = attached.entryReader.readSocketToBuffer(socketChannel);