diff options
author | Brian Clinkenbeard <brianclinkenbeard@users.noreply.github.com> | 2020-02-19 02:14:03 +0100 |
---|---|---|
committer | Brian Clinkenbeard <brianclinkenbeard@users.noreply.github.com> | 2020-02-19 03:04:33 +0100 |
commit | ad4e5c15fb5779309cc086045e8656254dd1e782 (patch) | |
tree | b7971047928675b71cf0b0ca665dc0acb98de823 | |
parent | update httplib to latest commit (diff) | |
download | yuzu-ad4e5c15fb5779309cc086045e8656254dd1e782.tar yuzu-ad4e5c15fb5779309cc086045e8656254dd1e782.tar.gz yuzu-ad4e5c15fb5779309cc086045e8656254dd1e782.tar.bz2 yuzu-ad4e5c15fb5779309cc086045e8656254dd1e782.tar.lz yuzu-ad4e5c15fb5779309cc086045e8656254dd1e782.tar.xz yuzu-ad4e5c15fb5779309cc086045e8656254dd1e782.tar.zst yuzu-ad4e5c15fb5779309cc086045e8656254dd1e782.zip |
-rw-r--r-- | src/core/hle/service/bcat/backend/boxcat.cpp | 7 | ||||
-rw-r--r-- | src/web_service/web_backend.cpp | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp index 67e39a5c4..f589864ee 100644 --- a/src/core/hle/service/bcat/backend/boxcat.cpp +++ b/src/core/hle/service/bcat/backend/boxcat.cpp @@ -200,7 +200,8 @@ private: DownloadResult DownloadInternal(const std::string& resolved_path, u32 timeout_seconds, const std::string& content_type_name) { if (client == nullptr) { - client = std::make_unique<httplib::SSLClient>(BOXCAT_HOSTNAME, PORT, timeout_seconds); + client = std::make_unique<httplib::SSLClient>(BOXCAT_HOSTNAME, PORT); + client->set_timeout_sec(timeout_seconds); } httplib::Headers headers{ @@ -448,8 +449,8 @@ std::optional<std::vector<u8>> Boxcat::GetLaunchParameter(TitleIDVersion title) Boxcat::StatusResult Boxcat::GetStatus(std::optional<std::string>& global, std::map<std::string, EventStatus>& games) { - httplib::SSLClient client{BOXCAT_HOSTNAME, static_cast<int>(PORT), - static_cast<int>(TIMEOUT_SECONDS)}; + httplib::SSLClient client{BOXCAT_HOSTNAME, static_cast<int>(PORT)}; + client.set_timeout_sec(static_cast<int>(TIMEOUT_SECONDS)); httplib::Headers headers{ {std::string("Game-Assets-API-Version"), std::string(BOXCAT_API_VERSION)}, diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index 6683f459f..737ffe409 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp @@ -73,14 +73,12 @@ struct Client::Impl { if (!parsedUrl.GetPort(&port)) { port = HTTP_PORT; } - cli = std::make_unique<httplib::Client>(parsedUrl.m_Host.c_str(), port, - TIMEOUT_SECONDS); + cli = std::make_unique<httplib::Client>(parsedUrl.m_Host.c_str(), port); } else if (parsedUrl.m_Scheme == "https") { if (!parsedUrl.GetPort(&port)) { port = HTTPS_PORT; } - cli = std::make_unique<httplib::SSLClient>(parsedUrl.m_Host.c_str(), port, - TIMEOUT_SECONDS); + cli = std::make_unique<httplib::SSLClient>(parsedUrl.m_Host.c_str(), port); } else { LOG_ERROR(WebService, "Bad URL scheme {}", parsedUrl.m_Scheme); return Common::WebResult{Common::WebResult::Code::InvalidURL, "Bad URL scheme"}; @@ -90,6 +88,7 @@ struct Client::Impl { LOG_ERROR(WebService, "Invalid URL {}", host + path); return Common::WebResult{Common::WebResult::Code::InvalidURL, "Invalid URL"}; } + cli->set_timeout_sec(TIMEOUT_SECONDS); httplib::Headers params; if (!jwt.empty()) { |