mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
if issue when onRead has no attached
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user