diff --git a/testing/node-driver/src/main/java/net/corda/testing/driver/SharedMemoryIncremental.java b/testing/node-driver/src/main/java/net/corda/testing/driver/SharedMemoryIncremental.java index 7d97f33140..88e6e726d7 100644 --- a/testing/node-driver/src/main/java/net/corda/testing/driver/SharedMemoryIncremental.java +++ b/testing/node-driver/src/main/java/net/corda/testing/driver/SharedMemoryIncremental.java @@ -76,8 +76,7 @@ public class SharedMemoryIncremental extends PortAllocation { newValue = (oldValue + 1); } boolean reserveSuccess = UNSAFE.compareAndSwapLong(null, startingAddress, oldValue, newValue); - boolean portAvailable = isLocalPortAvailable(newValue); - loopSuccess = reserveSuccess && portAvailable; + loopSuccess = reserveSuccess && isLocalPortAvailable(newValue); } while (!loopSuccess); return (int) newValue;