From 53baa8b09b91c1967f850d45048f8d7fde345b66 Mon Sep 17 00:00:00 2001 From: Rob Austin Date: Fri, 24 Apr 2015 10:45:49 +0100 Subject: [PATCH] simplified test --- .../openhft/chronicle/map/TcpReplicator.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/map/TcpReplicator.java b/src/main/java/net/openhft/chronicle/map/TcpReplicator.java index d18fa86e5..b8e81bd93 100644 --- a/src/main/java/net/openhft/chronicle/map/TcpReplicator.java +++ b/src/main/java/net/openhft/chronicle/map/TcpReplicator.java @@ -897,16 +897,13 @@ final class TcpReplicator extends AbstractChannelReplicator implements Clo serverSocket.bind(details.address()); // these can be run on this thread - addPendingRegistration(new Runnable() { - @Override - public void run() { - final Attached attached = new Attached(); - attached.connector = ServerConnector.this; - try { - serverChannel.register(TcpReplicator.this.selector, OP_ACCEPT, attached); - } catch (ClosedChannelException e) { - LOG.debug("", e); - } + addPendingRegistration(() -> { + final Attached attached = new Attached(); + attached.connector = ServerConnector.this; + try { + serverChannel.register(TcpReplicator.this.selector, OP_ACCEPT, attached); + } catch (ClosedChannelException e) { + LOG.debug("", e); } });