diff options
-rwxr-xr-x | indra/viewer_components/updater/llupdaterservice.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp index 522c4a54b5..16950e1d62 100755 --- a/indra/viewer_components/updater/llupdaterservice.cpp +++ b/indra/viewer_components/updater/llupdaterservice.cpp @@ -406,7 +406,7 @@ void LLUpdaterServiceImpl::response(LLSD const & content) setState(LLUpdaterService::UP_TO_DATE); } - else + else if ( content.isMap() && content.has("url") ) { // there is an update available... stopTimer(); @@ -430,6 +430,12 @@ void LLUpdaterServiceImpl::response(LLSD const & content) << LL_ENDL; mUpdateDownloader.download(url, content["hash"].asString(), mNewChannel, mNewVersion, more_info, required); } + else + { + LL_WARNS("UpdaterService") << "Invalid update query response ignored; retry in " + << mCheckPeriod << " seconds" << LL_ENDL; + restartTimer(mCheckPeriod); + } } void LLUpdaterServiceImpl::downloadComplete(LLSD const & data) @@ -570,6 +576,10 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event) << "No updater service defined for grid '" << LLGridManager::getInstance()->getGrid() << "' will check again in " << mCheckPeriod << " seconds" << LL_ENDL; + // Because the grid can be changed after the viewer is started (when the first check takes place) + // but before the user logs in, the next check may be on a different grid, so set the retry timer + // even though this check did not happen. The default time is once an hour, and if we're not + // doing the check anyway the performance impact is completely insignificant. restartTimer(mCheckPeriod); } } |