On 3/3/2014 9:00 AM, Bratislav Stojanovic wrote:
It seems that connection timeout parameter doesn't work on Linux Mint 16 (which is
basically Ubuntu). *Code runs perfectly fine on Windows.*Here's my setup :

<snip>

*.setConnectTimeout(1000)*

<snip>

*The problem : when I run this code on linux, there's no 1 sec delay between consecutive attempts. It just
*
*goes over 10 attempts and finished within ~200ms. Why?

*
*Am I doing something wrong or this is a bug? Please help.
*
*
P.S. I'm using http client 4.3.2.*

I assume that the service it's trying to connect to is down or in some way unavailable. What is the exact status? If the server is reachable on that port but the http server is not running, a connection attempt will be instantly refused, there's no reason to wait for the timeout period.

In order for a full second to pass, the port must be completely unreachable, which means the server either needs to be down or it needs to be firewalled in a way that offers no response at all rather than a refusal. Is this the case with the server that the Windows version is trying to contact?

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to