[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[xmlblaster] Re: minor socket ping/refreshSession method inconsistency?
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