Applied changes by Rob

This commit is contained in:
leventov
2015-01-31 23:19:09 +07:00
parent b395770956
commit 7e523d1bdc
3 changed files with 17 additions and 3 deletions
@@ -260,6 +260,19 @@ abstract class AbstractChannelReplicator implements Closeable {
isClosed = true;
// context.close();
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();
}