hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Methods and Request Timeouts
Date Wed, 02 Jun 2004 19:15:48 GMT
On Wed, 2004-06-02 at 17:58, Mark R. Diggory wrote:

> So far I'm looking at something like:
> 
> HttpConnection connection = 
> client.getHttpConnectionManager().getConnection(client.getHostConfiguration());
> connection.setConnectionTimeout(...)
> 
> But, my big concern is that this is again just bleed over into all the 
> connections as they are still coming from (and being returned to) a 
> pool. Is this a correct assumption?

Mark,

This is not that much of a problem as HttpClient always resets socket
timeout on the active connection prior to executing a method. The
problem is socket timeout setting is simply not thread safe. Socket
timeout value may change while connection is still being initialized
leading to unpredictable results.

This is a known limitation of 2.0 API which has already been solved in
CVS HEAD. 3.0 API (currently at alpha1) allows socket timeout to be set
at the HttpMethod level

http://issues.apache.org/bugzilla/show_bug.cgi?id=24154

Oleg


> 
> -Mark
> 
> 
> ______________________________________________________________________
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message