summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp7
-rw-r--r--indra/newview/llviewerinventory.cpp8
-rw-r--r--indra/newview/llviewerinventory.h1
3 files changed, 13 insertions, 3 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);
}
}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index a976cdc06d..a58ca182fc 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -688,7 +688,13 @@ LLViewerInventoryCategory::EFetchType LLViewerInventoryCategory::getFetching()
void LLViewerInventoryCategory::setFetching(LLViewerInventoryCategory::EFetchType fetching)
{
- if (fetching > mFetching) // allow a switch from normal to recursive
+ if (fetching == FETCH_FAILED)
+ {
+ const F32 FETCH_FAILURE_EXPIRY = 60.0f;
+ mDescendentsRequested.setTimerExpirySec(FETCH_FAILURE_EXPIRY);
+ mFetching = fetching;
+ }
+ else if (fetching > mFetching) // allow a switch from normal to recursive
{
if (mDescendentsRequested.hasExpired() || (mFetching == FETCH_NONE))
{
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 4297e194dd..1adc5403fd 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -217,6 +217,7 @@ public:
FETCH_NONE = 0,
FETCH_NORMAL,
FETCH_RECURSIVE,
+ FETCH_FAILED, // back off
} EFetchType;
EFetchType getFetching();
// marks as fetch being in progress or as done