HCOLL-240 now setting clientChannel to NULL on close

This commit is contained in:
Rob Austin
2014-12-19 09:08:45 +00:00
parent a6926bfe4b
commit 2f57721f52
@@ -75,7 +75,7 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable, Clon
private final ReaderWithSize<V> valueReaderWithSize;
@NotNull
private final WriterWithSize<V> valueWriterWithSize;
private volatile SocketChannel clientChannel;
private SocketChannel clientChannel;
@Nullable
private CloseablesManager closeables;
@@ -309,11 +309,12 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable, Clon
throw new UnsupportedOperationException();
}
public void close() {
public synchronized void close() {
if (closeables != null)
closeables.closeQuietly();
closeables = null;
clientChannel = null;
}