ASIHTTP and poor connections

Discussion in 'iOS Programming' started by nashyo, Oct 4, 2012.

  1. nashyo macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #1
    Regarding the well known ASIHTTP lib, does anybody know the best way to code defensively against poor internet connections, when sending an ASIFormDataRequest?
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    You need to explain more what you mean. What is the problem? What have you tried?

    The answer might be: use a long timeout and let the user cancel the operation. Long timeout probably is 60 seconds or longer.
     
  3. nashyo thread starter macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #3
    My client is experiencing a bug that I cannot reproduce. Yet he can! He is unavailable for a week so I can't get any more info.

    The logs show that a request was received server-side and a response sent, but the client didn't receive a response. There was no time out error and refreshing the request (refresh button) failed to spin the activity indicator (in status bar), like it usually does.

    After 5 minutes, the client would not send a fresh request. I think it is a threading issue.
     
  4. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    Why do you think it's a threading issue?

    Do you start the request from the main thread or a background thread? It should be started from the main thread.

    What does refresh the request mean? Do you create a new request? Do you cancel the old request?
     

Share This Page