mirror of https://github.com/apache/druid.git
Merge pull request #2544 from metamx/fixMaxPort
Limit PortFinder to 0xFFFF
This commit is contained in:
commit
53a5f07c14
|
@ -95,7 +95,8 @@ public class PortFinder
|
|||
|
||||
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)) {
|
||||
return i;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue