CODE
NSMutableURLRequest *urlRequest = [client requestWithMethod:@"POST" path:@"something.php" parameters:(NSDictionary *)parameters ];
[urlRequest setTimeoutInterval:10];
[urlRequest setTimeoutInterval:10];
the problem is, i tested the interval by connecting my iPhone to a 3g hotspot, then turning off the 3g and initiate the curl request and here's the result that i logged
QUOTE
2015-11-02 15:47:25.368 sportsbetting[876:218887] failure to connect, connection count: 0 error:
2015-11-02 15:47:29.417 [876:218887] failure to connect, connection count: 1 error:
2015-11-02 15:47:33.466 [876:218887] failure to connect, connection count: 2 error:
2015-11-02 15:47:37.519 [876:218887] failure to connect, connection count: 3 error:
2015-11-02 15:47:41.568 [876:218887] failure to connect, connection count: 4 error:
2015-11-02 15:47:29.417 [876:218887] failure to connect, connection count: 1 error:
2015-11-02 15:47:33.466 [876:218887] failure to connect, connection count: 2 error:
2015-11-02 15:47:37.519 [876:218887] failure to connect, connection count: 3 error:
2015-11-02 15:47:41.568 [876:218887] failure to connect, connection count: 4 error:
as you can see from the log time, the interval between retries is 4-5 secs apart and not 10 secs.. although this is acceptable for me, i'd like to know, why and where is the 4-5 sec limit set, i've googled around and couldn't find an answer to this. is it default to the NSURLRequest class? do apple enforce 4-5 sec retries on no internet? why is it like that? help guys, any answer is appreciated.
This post has been edited by Tamamama: Nov 3 2015, 02:07 AM
Nov 2 2015, 04:20 PM, updated 11y ago
Quote
0.0174sec
0.33
5 queries
GZIP Disabled