Skip to content

Commit a161dec

Browse files
authored
Merge pull request #64 from marksantos/FileLockBasedLockChecker_ReleaseLocks_Reserved
Fix for FileLockBasedLockChecker attempting to release unreserved locks
2 parents e538d4b + 63a64d4 commit a161dec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

affinity/src/main/java/net/openhft/affinity/AffinityLock.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,12 @@ public void bind(boolean wholeCore) {
322322

323323
final boolean canReserve(boolean specified) {
324324

325+
if (!specified && !reservable)
326+
return false;
327+
325328
if (!LockCheck.isCpuFree(cpuId))
326329
return false;
327330

328-
if (!specified && !reservable) return false;
329331
if (assignedThread != null) {
330332
if (assignedThread.isAlive()) {
331333
return false;

0 commit comments

Comments
 (0)