2
votes

I am using asihttprequest to connect and submit data. I use the timeout option but it is not working!

[request setTimeOutSeconds:20];
    [request setDelegate:self];

    [request startAsynchronous];

It continues to timeout in 10 seconds which is the default value. Anyone had the same problem? The data i send is a string with 3 letters.

1
Well it seems like ASIHTTPRequest has some issue. Timeouts are abundant with it. It's the first suggestion on Google if you type "asihttprequest".Gurpartap Singh

1 Answers

1
votes

It works for me.

First off, make sure you've using the most recent version of ASIHTTPRequest.

IF that doesn't fit it, try setting a breakpoint inside the body of the first if in ASIHTTPRequest.m selector shouldTimeOut - check the value of [self timeoutSeconds] and secondsSinceLastActivity. One of them must be wrong if you're getting a timeout; if it's timeoutSeconds trace back and see why it's not getting set to 20 seconds.