Skip to content

Commit

Permalink
better close logic for concurrent recovery streams
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchy committed Aug 20, 2012
1 parent 08ecd9d commit 79cb0ea
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ public RecoverySettings(Settings settings, NodeSettingsService nodeSettingsServi

public void close() {
concurrentStreamPool.shutdown();
try {
concurrentStreamPool.awaitTermination(1, TimeUnit.SECONDS);
} catch (InterruptedException e) {
// that's fine...
}
concurrentStreamPool.shutdownNow();
}

public ByteSizeValue fileChunkSize() {
Expand Down

0 comments on commit 79cb0ea

Please sign in to comment.