[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ortwin Glück resolved HTTPCLIENT-671.
-------------------------------------

    Resolution: Invalid

What happens here is that you are confusing socket timeout with connection 
timeout.

> setSoTimeout() doesn't seem to work
> -----------------------------------
>
>                 Key: HTTPCLIENT-671
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-671
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.0.1
>         Environment: Windows XP SP2, 1.4.2_13-b06
>            Reporter: Karsten Silz
>
> I try to use the socket timeout for an HttpClient instance, but it isn't 
> working.  Here's my code (approximately):
> Class attributes:
>   private static final int TIMEOUT = 15 * 1000;
>   private final HttpClient browser     = new HttpClient();
> Constructor:
>       HttpConnectionManager httpConnectionManager = new 
> SimpleHttpConnectionManager();
>       httpConnectionManager.getParams().setSoTimeout(TIMEOUT);
>       browser.setHttpConnectionManager(httpConnectionManager);
> Method:
>     final GetMethod request = new GetMethod(initialUrl);
>     request.setFollowRedirects(true);
>     final HttpMethodParams parameters = request.getParams();
>     parameters.setSoTimeout(TIMEOUT);
>     request.setParams(parameters);
>     int responseCode = browser.executeMethod(request );
> Now I hit a URL with a non-existing IP address, and instead of 15 seconds it 
> times out after pretty much 84 seconds.  What is wrong here

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to