It will give us an unused port if we control the range from startPort -> startPort + max number of threads - 1. We do, so it should be ok.