diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java index 67f469ce3a..75411490be 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java @@ -355,7 +355,7 @@ public class FileLockNodeManager extends FileBasedNodeManager { result = bb.get(0); } } finally { - if (lock != null) { + if (lock != null && lock.isValid()) { lock.release(); } }