Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6367899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:36:27+00:00 2026-05-25T00:36:27+00:00

Please look to the following code: NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:<…> cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:3.0]; <…>

  • 0

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).

  1. How to set real timeout instead not working timeoutInterval:3.0?
  2. How to add an ability to user to stop freezing NSURLConnection request by Cancel button in any moment?

Thanks a lot for help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:36:28+00:00Added an answer on May 25, 2026 at 12:36 am
    1. Note that in addition to the initializer you called, you can also call -setTimoutInterval: on an NSMutableURLRequest. The timeout value does indeed work, but any value less than 240 is ignored — that’s the minimum value respected by the iOS framework. If you want to set a lower timeout value, then your only choice is to use an asynchronous request.

    2. If you want to asynchronously cancel a request (ie, perform the request in the background and allow the foreground UI thread to issue a cancel in response to the user hitting a Cancel or Stop button), then you have to make an asynchronous URL request. There’s no way to do it with a synchronous request. For example, you can’t even kill a dispatch queue while it is currently executing a block.

    You might want to look at ASIHTTPRequest, which wraps up some of this functionality a bit differently.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

am new here. i have a slight problem; PLease look at the following code
Getting the above error in following code. How to rectify it. Thanks. Please look
please look at the following code first. #! /usr/bin/perl package foo; sub new {
Please look at the following code: #include <iostream> using namespace std; class A {
Please take a look at following code: #include <stdio.h> #include <iostream> using namespace std;
Please have a look at following code : import java.util.ArrayList; import java.util.List; class Main{
Please have a look to the following code: <?php $nomeDominio=''; if (isset($_GET['infoDominio'])) { $nomeDominio
Please take a look at the following code: Public Sub Method(Of TEntity As EntityObject)(ByVal
please look the following code: <?php if ($_GET['picture'] == 1) { echo <img src=\1.jpg\
Please look at the following code for a MSSQL Server 2005. Properties File driver=com.microsoft.sqlserver.jdbc.SQLServerDriver

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.