Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2018-03-02 16:13:18 +0300
committerAleksandr Zatsepin <alexzatsepin@users.noreply.github.com>2018-03-05 12:02:52 +0300
commita03dea30870e4af3e91c2468c0296cbc3ddf5196 (patch)
tree546bbc6bb7e1810a6a079a85ab8de64b9e6081cc
parent5c3ffdbbf91f0d160e3b65d325c494ae876bf924 (diff)
[local_ads] set network timeout to 5 seconds
-rw-r--r--local_ads/statistics.cpp1
-rw-r--r--map/local_ads_manager.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/local_ads/statistics.cpp b/local_ads/statistics.cpp
index f60782684c..629c99c4fe 100644
--- a/local_ads/statistics.cpp
+++ b/local_ads/statistics.cpp
@@ -356,6 +356,7 @@ void Statistics::SendToServer()
ASSERT(!bytes.empty(), ());
platform::HttpClient request(url);
+ request.SetTimeout(5); // timeout in seconds
#ifdef DEV_LOCAL_ADS_SERVER
request.LoadHeaders(true);
request.SetRawHeader("Host", "localads-statistics.maps.me");
diff --git a/map/local_ads_manager.cpp b/map/local_ads_manager.cpp
index 970c2f7493..5b6b85b5bb 100644
--- a/map/local_ads_manager.cpp
+++ b/map/local_ads_manager.cpp
@@ -368,6 +368,7 @@ bool LocalAdsManager::DownloadCampaign(MwmSet::MwmId const & mwmId, std::vector<
return false;
platform::HttpClient request(url);
+ request.SetTimeout(5); // timeout in seconds
bool const success = request.RunHttpRequest() && request.ErrorCode() == 200;
if (!success)