I have a simple server client application. Everything works, but at some stage it takes more than 5 minutes to get response from server (which is normal and it needs to be like this). The problem is that if it takes more than 5 minutes I keep getting this exception: java.net.SocketTimeoutException: Read timed out.
So I was wondering if there is some default socket timeout on windows or on the Java virtual machine I could set? I can’t change the client code so setSoTimeout() is not an option for me.
Using Windows XP..
EDIT: As i understand now is that the socket connection is not opened in the client side. Its passed on from the server. So i decompiled allso the server jar file. But still cant find anything about the timeout.
The default socket timeout is 0, which means never timeout. If it actually time out after 5 minutes, it means it has been set within the code. If the source isn’t available, and there isn’t a configuration, you can try to decompile the class, and look for
setSoTimeoutcalls.Since the comments, and the fact that searches didn’t find any setSoTimeout() calls, you can take a different approach. Just let it time out, and write a small script that will retry the call in case it does. If you can call your client from the command line, you can parse the output, if it goes on stderr.