(min, max)
| 281 | const max = 65535; |
| 282 | let count = 0; |
| 283 | const getRandomInt = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min; |
| 284 | let port = getRandomInt(min, max); |
| 285 | while (!isPortAvailable(port) && count < max - min) { |
| 286 | port++; |