better close logic for concurrent recovery streams

This commit is contained in:
Shay Banon 2012-08-20 02:05:54 +02:00
parent 08ecd9d772
commit 79cb0eafc4

View File

@ -85,6 +85,12 @@ public class RecoverySettings extends AbstractComponent {
public void close() {
concurrentStreamPool.shutdown();
try {
concurrentStreamPool.awaitTermination(1, TimeUnit.SECONDS);
} catch (InterruptedException e) {
// that's fine...
}
concurrentStreamPool.shutdownNow();
}
public ByteSizeValue fileChunkSize() {