hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <s...@elyograg.org>
Subject Re: Fwd: Connection timeout doesn't behave the same on windows and linux
Date Mon, 03 Mar 2014 18:02:23 GMT
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: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message