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 7754053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:12:39+00:00 2026-06-01T12:12:39+00:00

My project is using AFNetworking. https://github.com/AFNetworking/AFNetworking How do I dial down the timeout? Atm

  • 0

My project is using AFNetworking.

https://github.com/AFNetworking/AFNetworking

How do I dial down the timeout? Atm with no internet connection the fail block isn’t triggered for what feels like about 2 mins. Waay to long….

  • 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-06-01T12:12:40+00:00Added an answer on June 1, 2026 at 12:12 pm

    Changing the timeout interval is almost certainly not the best solution to the problem you’re describing. Instead, it seems like what you actually want is for the HTTP client to handle the network becoming unreachable, no?

    AFHTTPClient already has a built-in mechanism to let you know when internet connection is lost, -setReachabilityStatusChangeBlock:.

    Requests can take a long time on slow networks. It’s better to trust iOS to know how to deal slow connections, and tell the difference between that and having no connection at all.


    To expand on my reasoning as to why other approaches mentioned in this thread should be avoided, here are a few thoughts:

    • Requests can be cancelled before they’re even started. Enqueueing a request makes no guarantees about when it actually starts.
    • Timeout intervals shouldn’t cancel long-running requests—especially POST. Imagine if you were trying to download or upload a 100MB video. If the request is going along as best it can on a slow 3G network, why would you needlessly stop it if it’s taking a bit longer than expected?
    • Doing performSelector:afterDelay:... can be dangerous in multi-threaded applications. This opens oneself up to obscure and difficult-to-debug race conditions.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Django project using https for certain part of the url (/account/,
I´m compiling and ios project using an opencv framework, so I´m interested to know
I have a VB6 project (using Visual Studio 6) and I'm trying to distribute
I created a new project using aspx visual studio 2010. All I am trying
I've got a project using Maven 2 as the build tool. Now I am
I have a test project using MbUnit and TestDriven.Net. If I right-click on an
I'm building a project using a GNU tool chain and everything works fine until
I am building a project using Visual Studio. The project has a dependency on
I am developing project using Spring , Struts2 & Hibernate . Now I want
I succesfully created a project using seam credentials for authentication, but right now some

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.