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 Thu, 28 Dec 2006 11:11:58 GMT
Andrew Zhang wrote:
> On 12/27/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
>>
>> Mikhail Markov wrote:
>> > On 12/27/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
>> >> 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.
>> >
>> > The only race condition i see here is that another process could take
>> this
>> > port between closing of 1-st ServerSocket and opening a new one.
>> > Is this what you mean?
>> > (But the same thing may happen if one of applications takes pre-defined
>> > fixed port at any point during tests run when it's free.)
>>
>> Exactly -- that's why you may need a number of attempts.
> 
> 
> Attempt if the port doesn't work? Is it caused by code bug or real port
> confliction? :-)

Good question -- who knows<g>

Tim

Mime
View raw message