mirror of https://github.com/apache/druid.git
Limit PortFinder to 0xFFFF
This commit is contained in:
parent
917e7e58f5
commit
3fa7a7ebfe
|
@ -95,7 +95,8 @@ public class PortFinder
|
||||||
|
|
||||||
private int chooseNext(int start)
|
private int chooseNext(int start)
|
||||||
{
|
{
|
||||||
for (int i = start; i < Integer.MAX_VALUE; i++) {
|
// up to unsigned short max (65535)
|
||||||
|
for (int i = start; i <= 0xFFFF; i++) {
|
||||||
if (!usedPorts.contains(i)) {
|
if (!usedPorts.contains(i)) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue