set googleMapApi timeout
parent
c030e31a5a
commit
99d074d023
|
@ -200,7 +200,11 @@
|
|||
request.URL = urlComponents.URL;
|
||||
}
|
||||
|
||||
NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
|
||||
configuration.timeoutIntervalForRequest = 5.0;
|
||||
NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration];
|
||||
|
||||
NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
if (error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
completion(nil);
|
||||
|
@ -222,6 +226,7 @@
|
|||
}];
|
||||
|
||||
[task resume];
|
||||
|
||||
}
|
||||
|
||||
+ (NSArray *)convertPlaceDictToArray:(NSDictionary*)dict{
|
||||
|
|
Loading…
Reference in New Issue