Change URL timeout to 4 seconds to improve offline behavior

This commit is contained in:
Cameron Gutman
2018-08-27 01:55:34 -07:00
parent 90d47004e7
commit b5ea4c3e50

View File

@@ -108,8 +108,8 @@ static const NSString* HTTPS_PORT = @"47984";
NSURL* url = [[NSURL alloc] initWithString:urlString];
NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:url];
if (normalTimeout) {
// Timeout the request after 7 seconds
[request setTimeoutInterval:7];
// Timeout the request after 4 seconds
[request setTimeoutInterval:4];
}
else {
// Timeout the request after 60 seconds