mirror of
https://github.com/keycloak/keycloak.git
synced 2026-05-07 23:50:03 -05:00
Do not terminate persistent sessions worker on exceptions
Closes #38925 Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
committed by
GitHub
parent
cb4b6c8c8e
commit
6a37638a95
+9
-2
@@ -75,8 +75,14 @@ public class PersistentSessionsWorker {
|
||||
try {
|
||||
process(queue);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
break;
|
||||
// The arjuna transaction reaper might interrupt this thread due to a long-running transaction.
|
||||
// But we will not terminate this thread as it will need to continue handling requests.
|
||||
if (!stop) {
|
||||
LOG.warn("Caught interrupted exception", e);
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
// We will need to continue
|
||||
LOG.warn("Exception when processing queue events", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,6 +171,7 @@ public class PersistentSessionsWorker {
|
||||
try {
|
||||
t.join(TimeUnit.MINUTES.toMillis(1));
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user