Please look to the following code:
NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:<...> cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:3.0];
<...>
[NSURLConnection sendSynchronousRequest:request returningResponse:&WSresponse error:&WSerror]
This code bellow is called from a background thread:
[self performSelectorInBackground:@selector(<...>) withObject:nil];
Sometimes sendSynchronousRequest works much more than 3.0 sec. (abount 1 minute).
- How to set real timeout instead not working
timeoutInterval:3.0
? - How to add an ability to user to stop freezing
NSURLConnection
request by Cancel button in any moment?
Thanks a lot for help!