Revert 'Make working with new bytes' and a couple of fixes

This commit is contained in:
leventov
2015-07-01 10:45:48 +03:00
parent a61ea2240d
commit 5c8f737654
41 changed files with 5992 additions and 6208 deletions
@@ -256,12 +256,17 @@ abstract class AbstractChannelReplicator implements Closeable {
public void closeResources() {
isClosed = true;
// context.close();
executorService.shutdown();
try {
executorService.awaitTermination(5, TimeUnit.MILLISECONDS);
if (!executorService.awaitTermination(5, TimeUnit.MILLISECONDS)) {
executorService.shutdownNow();
try {
executorService.awaitTermination(10, TimeUnit.SECONDS);
} catch (InterruptedException e) {
LOG.error("", e);
}
}
} catch (Exception e) {
executorService.shutdownNow();
try {