harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [classlib][luni] java.net.ServerSocketTest fails - need help
Date Wed, 27 Dec 2006 11:36:48 GMT
Mikhail Markov wrote:
> Why not use ServerSocket(0) to just *obtain* some positive non-busy port
> number (and close it after port number obtaining) and after that test
> ServerSocket constructor with this obtained port number? In this case we'll
> not require any reserved ports at all.

There is obviously a race condition there, so you may have to make a
number of attempts to get the port you think is now free before others
take it.


View raw message