changed shutdown to also called shutdownNow

This commit is contained in:
Rob Austin
2015-01-31 00:11:39 +00:00
parent db5fee81ca
commit 8d500e1ab6
@@ -260,6 +260,19 @@ abstract class AbstractChannelReplicator implements Closeable {
public void closeResources() {
isClosed = true;
executorService.shutdown();
try {
executorService.awaitTermination(5, TimeUnit.MILLISECONDS);
} catch (Exception e) {
executorService.shutdownNow();
try {
executorService.awaitTermination(10, TimeUnit.SECONDS);
} catch (InterruptedException e1) {
LOG.error("", e);
}
}
closeables.closeQuietly();
if (segmentState != null)
segmentState.close();