Commit eb49e0b5 authored by Michael Ritter's avatar Michael Ritter
Browse files

Don't try to close the batch and validator threads in the cancel method

By trying to cancel these outside of the main thread we run the risk of deadlocking - as there is a join in the TokenValidator which will never be able to complete. Instead, let the main audit thread cancel them when it finishes.
parent 58c58362
......@@ -191,6 +191,7 @@ public final class AuditThread extends Thread implements CancelCallback {
iterableItems.cancel();
}
/*
if (batch != null) {
batch.close();
}
......@@ -198,10 +199,12 @@ public final class AuditThread extends Thread implements CancelCallback {
if (validator != null) {
validator.close();
}
*/
if (AuditThreadFactory.isRunning(coll) || AuditThreadFactory.isQueued(coll)) {
AuditThreadFactory.finished(coll);
}
this.interrupt();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment