fixed concurrent modification exception
Set port -1 to chose randomly a port