Skip to content
Snippets Groups Projects
Commit fc4a6431 authored by Oz Linden's avatar Oz Linden
Browse files

CHOP-942: fix crash if update check times out

parent 4dd24505
No related branches found
No related tags found
No related merge requests found
......@@ -108,25 +108,30 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & hostUrl,
unsigned char uniqueid[MD5HEX_STR_SIZE],
bool willing_to_test)
{
llassert(!mInProgress);
mInProgress = true;
mHostUrl = hostUrl;
mServicePath = servicePath;
mChannel = channel;
mVersion = version;
mPlatform = platform;
mPlatformVersion = platform_version;
memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE);
mWillingToTest = willing_to_test;
if (!mInProgress)
{
mInProgress = true;
mHostUrl = hostUrl;
mServicePath = servicePath;
mChannel = channel;
mVersion = version;
mPlatform = platform;
mPlatformVersion = platform_version;
memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE);
mWillingToTest = willing_to_test;
mProtocol = sProtocolVersion;
mProtocol = sProtocolVersion;
std::string checkUrl = buildUrl(hostUrl, servicePath, channel, version, platform, platform_version, uniqueid, willing_to_test);
LL_INFOS("UpdaterService") << "checking for updates at " << checkUrl << LL_ENDL;
std::string checkUrl = buildUrl(hostUrl, servicePath, channel, version, platform, platform_version, uniqueid, willing_to_test);
LL_INFOS("UpdaterService") << "checking for updates at " << checkUrl << LL_ENDL;
mHttpClient.get(checkUrl, this);
mHttpClient.get(checkUrl, this);
}
else
{
LL_WARNS("UpdaterService") << "attempting to restart a check when one is in progress; ignored" << LL_ENDL;
}
}
void LLUpdateChecker::Implementation::completed(U32 status,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment