Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error : "The operation couldn�t be completed. Operation timed out" #385

Open
sudheerpalchuri opened this issue Jan 29, 2014 · 1 comment

Comments

@sudheerpalchuri
Copy link

When i try to download the PDF's using ASIHTTPRequest. I am getting the error. Please check the below code and error. Please help me to fix this.

ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:strUrl]];
request.shouldAttemptPersistentConnection = NO;
[request setShouldContinueWhenAppEntersBackground:YES];
[request setDownloadDestinationPath:strPdfPath];
[request setTimeOutSeconds:60000];
[request setDelegate:self];
[request setShowAccurateProgress:YES];
[request setDownloadProgressDelegate:progressBar];
[request setDidFinishSelector:@selector(requestFinished:)];
[request setDidFailSelector:@selector(requestFailed:)];
[request setDidStartSelector:@selector(requestStarted:)];
[request startAsynchronous];

Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred" UserInfo=0x15572bc0 {NSUnderlyingError=0x15570b80 "The operation couldn�t be completed. Operation timed out", NSLocalizedDescription=A connection failure occurred}

@jogu
Copy link
Collaborator

jogu commented Jan 29, 2014

Unfortunately the problem is likely to be related to your URL or the network connectivity on your device.

However, unless you have a good reason to continue to use ASIHTTPRequest (ASIHTTPRequest is not recommended for new projects), I'd recommend you switch to AFNetworking immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants