summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-10-13 14:30:21 -0400
committerGitHub <noreply@github.com>2026-10-13 14:30:21 -0400
commit8ba5d1a8adc47c21b23d9482e72de9517f9a98fc (patch)
treef97d67c8ee574c6ebaac8d0d8ba120d041dca051 /indra/newview/lltexturefetch.cpp
parent18648fc51e2a0c750182d8aa3814ed5b6bf8445e (diff)
parentefc7d2d7bb542ac905cb7ebd82ee329523f95608 (diff)
Merge pull request #6193 from secondlife/release/26.4
Release/26.4
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r--indra/newview/lltexturefetch.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 51ade60827..a0d7aac3f3 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1297,7 +1297,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
else
{
mCanUseCapability = false;
- if (gDisconnected)
+ if (gDisconnected || LLAppViewer::isExiting())
{
// We lost connection or are shutting down.
mCanUseHTTP = false;
@@ -1315,6 +1315,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
else
{
mCanUseCapability = false;
+ if (gDisconnected || LLAppViewer::isExiting())
+ {
+ // We lost connection or are shutting down.
+ mCanUseHTTP = false;
+ return true; // abort
+ }
mRegionRetryAttempt++;
mRegionRetryTimer.setTimerExpirySec(CAP_MISSING_EXPIRATION_DELAY);
// This will happen if not logged in or if a region deoes not have HTTP Texture enabled
@@ -2521,18 +2527,26 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L
{
LL_DEBUGS("Avatar") << " requesting " << id << " " << w << "x" << h << " discard " << desired_discard << " type " << f_type << LL_ENDL;
}
- LLTextureFetchWorker* worker = getWorker(id);
+
+ // Potentially we might remove a request, lock queue here instead
+ // of getWorker to make sure request will persist till removeRequest
+ lockQueue();
+ LLTextureFetchWorker* worker = getWorkerAfterLock(id);
if (worker)
{
if (worker->mHost != host)
{
LL_WARNS(LOG_TXT) << "LLTextureFetch::createRequest " << id << " called with multiple hosts: "
<< host << " != " << worker->mHost << LL_ENDL;
- removeRequest(worker, true);
+ size_t erased_1 = mRequestMap.erase(worker->mID);
+ llassert_always(erased_1 > 0);
+ unlockQueue();
+ worker->scheduleDelete();
worker = NULL;
return CREATE_REQUEST_ERROR_MHOSTS;
}
}
+ unlockQueue();
S32 desired_size;
std::string exten = gDirUtilp->getExtension(url);
@@ -2711,9 +2725,11 @@ void LLTextureFetch::deleteAllRequests()
}
LLTextureFetchWorker* worker = mRequestMap.begin()->second;
- unlockQueue() ;
+ size_t erased_1 = mRequestMap.erase(worker->mID);
+ llassert_always(erased_1 > 0);
+ unlockQueue();
- removeRequest(worker, true);
+ worker->scheduleDelete();
}
}