From abebd1341400f26bfcd82072320a262f31030167 Mon Sep 17 00:00:00 2001 From: Rob Austin Date: Mon, 2 Feb 2015 10:17:29 +0000 Subject: [PATCH] ignore java.util.concurrent.RejectedExecutionException when already closed --- .../net/openhft/chronicle/map/StatelessChronicleMap.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java b/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java index 29610c33c..83c376260 100644 --- a/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java @@ -1191,8 +1191,12 @@ class StatelessChronicleMap implements ChronicleMap, Closeable, Clon } else inBytes.limit(inBytes.capacity()); - // block until we have received all the bytes in this chunk - receiveBytesFromSocket(remainingBytes, timeoutTime); + try { + // block until we have received all the bytes in this chunk + receiveBytesFromSocket(remainingBytes, timeoutTime); + }catch (java.nio.channels.AsynchronousCloseException e ){ + return inBytes; + } final boolean isException = inBytes.readBoolean();