Using the built-in HTTP server connector in Restlet 2.2.0, the following
client code will run into a read timeout after one second. The server
resource doesn't matter, even the most basic one will do.


        System.setProperty("http.keepAlive", "false");

        HttpURLConnection urlConnection = (HttpURLConnection)
url.openConnection();
        urlConnection.setReadTimeout(1000);
        System.out.println("Response: " + urlConnection.getResponseCode());


This is JDK 1.6.0_20 on OS X. If you enable persistent connections by
commenting out the first line the request works fine. I've tested the Simple
and the Jetty server connectors, they have no problem with a non-persistent
HttpURLConnection.

-- 
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/Non-persistent-HttpURLConnections-timeout-with-built-in-server-tp5337760p5337760.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2638251

Reply via email to