LUCENE-4245: better record interruption

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1364908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-07-24 06:19:59 +00:00
parent 6fa408286d
commit 28ced818d3
1 changed files with 2 additions and 1 deletions

View File

@ -870,7 +870,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
}
private void closeInternal(boolean waitForMerges, boolean doFlush) throws IOException {
boolean interrupted = Thread.interrupted();
boolean interrupted = false;
try {
if (pendingCommit != null) {
@ -894,6 +894,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
} finally {
// clean up merge scheduler in all cases, although flushing may have failed:
interrupted = Thread.interrupted();
if (waitForMerges) {
try {