Skip to content

Commit f07bd1a

Browse files
Increase parallel connection limit for iOS
Default number of parallel connection per host is 6 for hardware iOS device. This limits the speed of network stages of map download and map update. Increase this limit to 32 connections. Relates-To: HERESDK-5947 Signed-off-by: Mykhailo Diachenko <ext-mykhailo.z.diachenko@here.com>
1 parent ee1ca35 commit f07bd1a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

olp-cpp-sdk-core/src/http/ios/OLPHttpClient.mm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
namespace {
3333
constexpr auto kLogTag = "OLPHttpClient";
34+
constexpr auto kMaximumConnectionPerHost = 32;
3435

3536
using SessionId = std::uint64_t;
3637
static SessionId sessionIdCounter_ = std::numeric_limits<SessionId>::min() + 1;
@@ -60,7 +61,7 @@ void OnExitBackground() override {
6061

6162
} // namespace
6263

63-
@interface OLPHttpClient ()<NSURLSessionDataDelegate>
64+
@interface OLPHttpClient () <NSURLSessionDataDelegate>
6465

6566
@property(nonatomic) NSMutableDictionary* tasks;
6667

@@ -673,6 +674,8 @@ - (NSURLSession*)urlSessionWithProxy:(NSDictionary*)proxyDict
673674
config = [NSURLSessionConfiguration ephemeralSessionConfiguration];
674675
}
675676

677+
config.HTTPMaximumConnectionsPerHost = kMaximumConnectionPerHost;
678+
676679
if (proxyDict) {
677680
config.connectionProxyDictionary = proxyDict;
678681
}

0 commit comments

Comments
 (0)