I have a code that connects to a balance, using java socket. The problem is that the connection timeout parameter isn't working properly. No matter what parameter is passed, my waiting time is always 24 seconds.
Is there some sort of parameter on the server I should change?
Here's the part of the code that might interest you.
int TimeOutConnectionMs = TimeOutConnection.intValue() * 1000;
socket = new Socket();
socket.connect(new InetSocketAddress(host, portNumber.intValue()) , TimeOutConnection.intValue() * 1000);
The exceptions used are the following
} catch (SocketTimeoutException e) {
msgException = e.getMessage();
logMessage(process, "EXCEPTION", niveauLog.intValue(), "SocketTimeoutException: " + msgException, host + "_" + portNumber);
} catch (java.net.SocketException e) {
msgException = e.getMessage();
logMessage(process, "EXCEPTION", niveauLog.intValue(), "java net Socket Exception: " + msgException, host + "_" + portNumber);
} catch (java.net.UnknownHostException e) {
msgException = e.getMessage();
logMessage(process, "EXCEPTION", niveauLog.intValue(), "java net Unknown Host Exception: " + msgException, host + "_" + portNumber);
Thanks for your help