hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angie Lin ...@heyang.org>
Subject timeout in 3.0-beta1
Date Wed, 01 Dec 2004 19:23:53 GMT
Do the timeouts work?

I've tried:

   int CONN_TIMEOUT=10000;
   HttpClient client=new HttpClient();
   // set timeout on client
   client.setConnectionTimeout(CONN_TIMEOUT);
   client.getParams().setParameter("http.connection.timeout",
                                   new Integer(CONN_TIMEOUT));

   // set timeout on connection manager
    
client.getHttpConnectionManager().getParams().setParameter("http.connect 
ion.timeout",
                                                              new  
Integer(CONN_TIMEOUT));

   // set timeout on method
   GetMethod get=new  
GetMethod("http://some.nonexistent.com/somepage.html");
   get.getParams().setParameter("http.connection.timeout", new  
Integer(CONN_TIMEOUT));
   get.setHttp11(true);

   client.executeMethod(get);


But it still takes roughly 3 minutes instead of the 10 seconds I  
expected.  Is there a different way for specifying the timeout?

--
Angie Lin


!DSPAM:41ae1a83233321495318546!


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


Mime
View raw message