Re: Bug in xmlrpc-3.0b1

2006-08-02 Thread Jochen Wiedmann

On 8/2/06, Stanislav Miklik [EMAIL PROTECTED] wrote:

Current code is:
   } *catch* (BindException e) {
*if* (i == 10) {
*   throw* e;


Throwing the exception here will leave the circle.

Jochen

--
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in xmlrpc-3.0b1

2006-08-01 Thread Jochen Wiedmann

Stanislav Miklik wrote:


Selected text seems to me like neverending cycle. I don't see the way out
and also variable l is always l=0.


You are right for the l=0. Fixed.

As for the neverending cycle, I can't follow you:

for (int i = 1;  ;  i++) {
...
if (i == 10) {
throw e;
}
}


Jochen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bug in xmlrpc-3.0b1

2006-07-31 Thread Stanislav Miklik

Hello,

I think I found bug in xmlrpc-3.0b1. Maybe it is corrected now, but also in
rc1 it was the same. I can't find the way to report this bug, also I write
email to you.
Bug - more correctly:

class:  org.apache.xmlrpc.webserver.WebServer

method *

private
**synchronized* *void* setupServerSocket( *int* backlog) *throws*IOException
*{*

// Since we can't reliably set SO_REUSEADDR until JDK 1.4 is

// the standard, try to (re-)open the server socket several

// times. Some OSes (Linux and Solaris, for example), hold on

// to listener sockets for a brief period of time for security

// reasons before relinquishing their hold.

*for* (*int* i = 1; ; i++) {

*try* {

serverSocket = createServerSocket(port, backlog, address);

// A socket timeout must be set.

*if* (serverSocket.getSoTimeout() = 0) {

serverSocket.setSoTimeout(4096);

}

*return*;

}
*catch* (BindException e) {

*if* (i == 10) {

*throw* e;

}
*else* {

*long* waitUntil = System.currentTimeMillis();

*for* (;;) {

*long* l = waitUntil - System.currentTimeMillis();

*if* (l  0) {

*try* {

Thread.sleep(l);

}
*catch* (InterruptedException ex) {

}

}

}

}

}

}

}



Selected text seems to me like neverending cycle. I don't see the way out
and also variable l is always l=0.



Bye, hopefully it is not problem to correct it.

Stano.