In front of each "return -1" insert a
ex.printStackTrace();
This will most likely tell you what you need to know.
Thorbjørn Ravn Andersen
2010-07-30 17:25:28
In front of each "return -1" insert a
ex.printStackTrace();
This will most likely tell you what you need to know.
So what's your behaviour on your "problem" server with the full example code when running it three times in a row? Does it always produce the same result if you run it a couple of times?
Could it be that
in.ready()
simply returns false the first time it's checked in the loop, because your target server simply doesn't send the response quickly enough?