diff --git a/lock4j-redisson-spring-boot-starter/src/main/java/com/baomidou/lock/executor/RedissonLockExecutor.java b/lock4j-redisson-spring-boot-starter/src/main/java/com/baomidou/lock/executor/RedissonLockExecutor.java index b7453cd4436115e56d2a1fcda67716b197111273..11b63504112e3f6814362c47b2d1e81bec3c8a00 100644 --- a/lock4j-redisson-spring-boot-starter/src/main/java/com/baomidou/lock/executor/RedissonLockExecutor.java +++ b/lock4j-redisson-spring-boot-starter/src/main/java/com/baomidou/lock/executor/RedissonLockExecutor.java @@ -53,7 +53,7 @@ public class RedissonLockExecutor extends AbstractLockExecutor { @Override public boolean releaseLock(String key, String value, RLock lockInstance) { - if (lockInstance.isHeldByCurrentThread()) { + if (lockInstance.isLocked() && lockInstance.isHeldByCurrentThread()) { try { lockInstance.unlockAsync().get(); return true;