Merge pull request #7525 from corda/merge-release/os/4.9-release/os/4.10-2023-10-06-5

ENT-10860: Merging forward updates from release/os/4.9 to release/os/4.10 - 2023-10-06
This commit is contained in:
Rick Parker 2023-10-06 17:43:25 +01:00 committed by GitHub
commit d48f95e1fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;