Skip to content

Commit e3339a9

Browse files
PiotrDuzspring-builds
authored andcommitted
Gh-10446: RedisLockRegistry stopRenew is not thread safe
Fixes: #10446 Signed-off-by: PiotrDuz <[email protected]> (cherry picked from commit 17beaef)
1 parent dbfc6d7 commit e3339a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-integration-redis/src/main/java/org/springframework/integration/redis/util/RedisLockRegistry.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,9 @@ protected final boolean renew() {
599599
}
600600

601601
protected final void stopRenew() {
602-
if (this.renewFuture != null) {
603-
this.renewFuture.cancel(true);
602+
ScheduledFuture<?> renewFutureToCancel = this.renewFuture;
603+
if (renewFutureToCancel != null) {
604+
renewFutureToCancel.cancel(true);
604605
this.renewFuture = null;
605606
}
606607
}

0 commit comments

Comments
 (0)