mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-133 Avoid duplicate closing of TCP/UDP replicators
This commit is contained in:
@@ -58,6 +58,7 @@ abstract class AbstractChannelReplicator implements Closeable {
|
||||
private final Queue<Runnable> pendingRegistrations = new ConcurrentLinkedQueue<Runnable>();
|
||||
@Nullable
|
||||
private final Throttler throttler;
|
||||
volatile boolean isClosed = false;
|
||||
|
||||
AbstractChannelReplicator(String name, ThrottlingConfig throttlingConfig,
|
||||
int maxEntrySizeBytes)
|
||||
@@ -108,6 +109,7 @@ abstract class AbstractChannelReplicator implements Closeable {
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
isClosed = true;
|
||||
closeables.closeQuietly();
|
||||
executorService.shutdownNow();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user