Skip to content

Commit 982a9ea

Browse files
author
David Cooke
committed
nice
1 parent 0c1328c commit 982a9ea

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ allprojects {
44
apply plugin: 'jacoco'
55

66
group = 'uk.co.ractf'
7-
version = '0.0.68'
7+
version = '0.0.69'
88

99
repositories {
1010
maven { url "https://repo1.maven.org/maven2/" }

polaris-application/src/main/java/uk/co/ractf/polaris/controller/PortAllocator.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ public Map<PortMapping, PortBinding> allocate(final List<PortMapping> portMappin
6161
}
6262
}
6363

64+
lastTcpPort++;
65+
lastUdpPort++;
6466
if (portAllocations.getTcp().contains(lastTcpPort)) {
65-
lastTcpPort++;
67+
lastTcpPort = generatePort(min, max, portAllocations.getTcp());
6668
}
6769
if (portAllocations.getUdp().contains(lastUdpPort)) {
68-
lastUdpPort++;
70+
lastUdpPort = portAllocations.getUdp().contains(lastTcpPort) ? generatePort(min, max, portAllocations.getUdp()) : lastTcpPort;
6971
}
7072
}
7173
return portBindings;

0 commit comments

Comments
 (0)