[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] Re: minor socket ping/refreshSession method inconsistency?
Hi Póka,
The code you show below has slightly changed since the last release
however I can see from the code that the behaviour you have has not been
solved yet. I think we need first to look at the impact of changing this
exception to be a communication exception before we make the change. As
soon as we have fixed the problem we let you know.
Regards
Michele
Póka Balázs wrote:
> Hi there,
>
> I did what I described in my previous mail. Now DispatchConnection
> started to misbehave. It tries to reconnect every 400 ms (and not the
> reconnection delay), and on top of that, the client thought it was in
> synchronous mode when the connection failed.
>
> This failure (to detect the connection error properly) is due to
> DispatchConnection.java: 486-493:
>
> if (ex != null) {
> if (retry(ex)) {
> toReconnected = false;
> }
> else {
> toReconnected = true;
> }
> }
>
> The ex was "The hostname [***xx***] of url 'socket://***xx***:57608' is
> invalid, check your '-plugin/socket/hostname <ip>' setting:
> java.net.UnknownHostException: ***xx***"
>
> The problem is that the address is OK, the machine just does not have
> internet access, and no name server access either. This type of
> exception should be handled as a simple communication exception, so
> retry(ex) should return true in this case, too.
>
> So this causes my listeners to think that the connection is OK
> (toReconnected=true), and the code trying to reconnect at fixed 400ms
> intervals.
>
> thanks for your reply,
> Balázs Póka