iOS ASIHTTP and poor connections

nashyo

macrumors 6502
Original poster
Oct 1, 2010
299
0
Bristol
Regarding the well known ASIHTTP lib, does anybody know the best way to code defensively against poor internet connections, when sending an ASIFormDataRequest?
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
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.
 

nashyo

macrumors 6502
Original poster
Oct 1, 2010
299
0
Bristol
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.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.