Hi folks --

I've been digging through docs for a couple hours and trying various 
combinations of things, but still haven't managed to get Restlet's timeout 
behavior to Do The Expected Thing.

Up earlier in the code I've got:

        client = new Client(new Context(), Protocol.HTTP);

And then later:

    public void setTimeout(int seconds)
    {

        int ms = seconds * 1000;
        client.setConnectTimeout(ms);
        client.getContext().getParameters().add("readTimeout", 
String.valueOf(ms));
    }

I've got a dummy server running that sleeps for 10 seconds in requests and the 
above, when called with 5 seconds, happily waits for the request to finish.  
I've tried with both the built in and Apache clients.

Anything obvious I'm missing?

-Scott

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

Reply via email to