diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-12-04 22:48:00 +0200 |
|---|---|---|
| committer | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-12-06 01:02:42 +0200 |
| commit | 71d547b255c87297a4b97a9b05d004a743ab68e6 (patch) | |
| tree | 987ef13d796c4241dbeedc7870846cf79a55de15 /indra/newview/llinventorymodelbackgroundfetch.cpp | |
| parent | 38fbe5267bef11d57cb3ad7795c3a9b602e414c5 (diff) | |
SL-20181 Back off on failure
Diffstat (limited to 'indra/newview/llinventorymodelbackgroundfetch.cpp')
| -rw-r--r-- | indra/newview/llinventorymodelbackgroundfetch.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 493fb139ac..12debd7923 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -582,6 +582,7 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i return; } + LLViewerInventoryCategory::EFetchType new_state = LLViewerInventoryCategory::FETCH_NONE; bool request_descendants = false; if (response_id.isNull()) // Failure { @@ -599,10 +600,12 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i // set folder's version to prevent viewer from trying to request folder indefinetely LLViewerInventoryCategory* cat(gInventory.getCategory(request_id)); - if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN) + if (cat && cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN) { cat->setVersion(0); } + // back off for a bit in case something tries to force-request immediately + new_state = LLViewerInventoryCategory::FETCH_FAILED; } } else @@ -655,7 +658,7 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i LLViewerInventoryCategory * cat(gInventory.getCategory(request_id)); if (cat) { - cat->setFetching(LLViewerInventoryCategory::FETCH_NONE); + cat->setFetching(new_state); } } |
