code.onehippo.org is currently readonly. We are migrating to code.bloomreach.com, please continue working there on Monday 14/12. See: https://docs.bloomreach.com/display/engineering/GitLab

Commit 8a6b58b3 authored by Ard Schrijvers's avatar Ard Schrijvers

REPO-1811 If a Thread is already interrupted, don't interrupt again

parent 591ff099
......@@ -84,7 +84,12 @@ public class LockThreadInterrupter implements Runnable {
try {
lockThreadForAbortFound = true;
log.info("Found Thread '{}' to be interrupted for Lock '{}'", thread.getName(), lockKey);
thread.interrupt();
if (thread.isInterrupted()) {
log.info("Thread '{}' has already been interrupted. Not interrupting again.", thread.getName());
} else {
log.info("Interrupting thread '{}'", thread.getName());
thread.interrupt();
}
} catch (SecurityException e) {
String msg = String.format("Thread '%s' is not allowed to be interrupted. Can't abort '%s'",
thread.getName(), lock.getLockKey());
......
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