You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://build.spring.io/browse/INT-MASTER-1024
When the Lettuce Redis client catches an `InterruptedException`, it is
wrapped to the `RedisCommandInterruptedException`, therefore when we
catch an exception on our code level it is not an `InterruptedException`
anymore and we can't proceed in the loop because the tread is
`interrupted` already.
* Check the `interrupted` alongside with the `InterruptedException`
to restart a loop from a fresh thread.
**Cherry-pick to 5.0.x**
(cherry picked from commit fc47952)
Copy file name to clipboardExpand all lines: spring-integration-core/src/main/java/org/springframework/integration/support/leader/LockRegistryLeaderInitiator.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -398,7 +398,7 @@ else if (acquired) {
398
398
}
399
399
}
400
400
401
-
if (einstanceofInterruptedException) {
401
+
if (einstanceofInterruptedException || Thread.currentThread().isInterrupted()) {
402
402
Thread.currentThread().interrupt();
403
403
if (isRunning()) {
404
404
logger.warn("Restarting LeaderSelector because of error.", e);
0 commit comments