mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
Projucer: Added timeouts to version checker web requests
This commit is contained in:
parent
baaa7892bb
commit
2b6fe97384
2 changed files with 3 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ LatestVersionCheckerAndUpdater::LatestVersionCheckerAndUpdater()
|
|||
|
||||
LatestVersionCheckerAndUpdater::~LatestVersionCheckerAndUpdater()
|
||||
{
|
||||
stopThread (1000);
|
||||
stopThread (6000);
|
||||
clearSingletonInstance();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ std::unique_ptr<InputStream> VersionInfo::createInputStreamForAsset (const Asset
|
|||
|
||||
return std::unique_ptr<InputStream> (downloadUrl.createInputStream (false, nullptr, nullptr,
|
||||
"Accept: application/octet-stream",
|
||||
0, &responseHeaders, &statusCode, 1));
|
||||
5000, &responseHeaders, &statusCode, 1));
|
||||
}
|
||||
|
||||
bool VersionInfo::isNewerVersionThanCurrent()
|
||||
|
|
@ -70,7 +70,7 @@ bool VersionInfo::isNewerVersionThanCurrent()
|
|||
std::unique_ptr<VersionInfo> VersionInfo::fetch (const String& endpoint)
|
||||
{
|
||||
URL latestVersionURL ("https://api.github.com/repos/juce-framework/JUCE/releases/" + endpoint);
|
||||
std::unique_ptr<InputStream> inStream (latestVersionURL.createInputStream (false));
|
||||
std::unique_ptr<InputStream> inStream (latestVersionURL.createInputStream (false, nullptr, nullptr, {}, 5000));
|
||||
|
||||
if (inStream == nullptr)
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue