From 94e5b926f8f984cb1c9862794a5f68f394bf646e Mon Sep 17 00:00:00 2001 From: Mykhailo Diachenko Date: Tue, 25 Mar 2025 11:04:46 +0200 Subject: [PATCH] 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 --- olp-cpp-sdk-core/src/http/ios/OLPHttpClient.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/olp-cpp-sdk-core/src/http/ios/OLPHttpClient.mm b/olp-cpp-sdk-core/src/http/ios/OLPHttpClient.mm index 18b27dce7..83dc7949d 100644 --- a/olp-cpp-sdk-core/src/http/ios/OLPHttpClient.mm +++ b/olp-cpp-sdk-core/src/http/ios/OLPHttpClient.mm @@ -31,6 +31,7 @@ namespace { constexpr auto kLogTag = "OLPHttpClient"; +constexpr auto kMaximumConnectionPerHost = 32; using SessionId = std::uint64_t; static SessionId sessionIdCounter_ = std::numeric_limits::min() + 1; @@ -673,6 +674,8 @@ - (NSURLSession*)urlSessionWithProxy:(NSDictionary*)proxyDict config = [NSURLSessionConfiguration ephemeralSessionConfiguration]; } + config.HTTPMaximumConnectionsPerHost = kMaximumConnectionPerHost; + if (proxyDict) { config.connectionProxyDictionary = proxyDict; }