Updater: Increase request timeout to 30s

This commit is contained in:
spycrab 2018-03-23 22:24:45 +01:00
parent 22d851d930
commit f3e6f0f2d4
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@
#include <OptionParser.h> #include <OptionParser.h>
#include <algorithm> #include <algorithm>
#include <array> #include <array>
#include <chrono>
#include <cstdio> #include <cstdio>
#include <ed25519/ed25519.h> #include <ed25519/ed25519.h>
#include <mbedtls/base64.h> #include <mbedtls/base64.h>
@ -471,7 +472,7 @@ Manifest::Hash ComputeHash(const std::string& contents)
bool DownloadContent(const std::vector<Manifest::Hash>& to_download, bool DownloadContent(const std::vector<Manifest::Hash>& to_download,
const std::string& content_base_url, const std::string& temp_path) const std::string& content_base_url, const std::string& temp_path)
{ {
Common::HttpRequest req; Common::HttpRequest req(std::chrono::seconds(30));
for (const auto& h : to_download) for (const auto& h : to_download)
{ {
std::string hash_filename = HexEncode(h.data(), h.size()); std::string hash_filename = HexEncode(h.data(), h.size());