diff options
| author | Darl <me@darl.cat> | 2026-04-20 18:22:52 -0500 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-04-21 21:53:41 +0300 |
| commit | f0b083c5e5223ec2e6c4f6a6761ce9480239d1de (patch) | |
| tree | 01eb4c73eed175603414b5b319529c77e81fb18e | |
| parent | e03869c4482bdfab1b8b5a3170f96bcd8c4e2a3a (diff) | |
LLMuteList::isLoadedFromServer should also include MLS_SERVER_CACHE
This fixes a bug where the user logs in with good cache, server issues use-cached response, and then the viewer would send another mutelist request on region change.
Signed-off-by: Darl <me@darl.cat>
| -rw-r--r-- | indra/newview/llmutelist.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llmutelist.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index b72301c566..0015bd09fb 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -879,7 +879,7 @@ void LLMuteList::requestFromServer(const LLUUID& agent_id) void LLMuteList::cache(const LLUUID& agent_id) { // Write to disk even if empty, but never from degraded fallback state. - if (isLoaded() && mLoadSource != MLS_FALLBACK_CACHE) + if (isLoaded() && !isLoadedDegraded()) { const std::string filename = getCacheFilename(agent_id); saveToFile(filename); diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h index 2781e9b177..aff23c72d1 100644 --- a/indra/newview/llmutelist.h +++ b/indra/newview/llmutelist.h @@ -129,9 +129,9 @@ public: // Load state accessors. bool isLoaded() const { return mLoadState == ML_LOADED; } // Loaded, but not necessarily from server. bool isFailed() const { return mLoadState == ML_FAILED; } // Unable to load any mute list. Server did not reply. - // Loaded from server, which is the only source we consider authoritative. - bool isLoadedFromServer() const { return isLoaded() && (mLoadSource == MLS_SERVER || mLoadSource == MLS_SERVER_EMPTY); } - // Loaded, but from cache. Would be nice to upgrade to a server load from here if possible. + // Loaded from an authoritative server response, including when the server directs us to use our cached copy. + bool isLoadedFromServer() const { return isLoaded() && (mLoadSource == MLS_SERVER || mLoadSource == MLS_SERVER_EMPTY || mLoadSource == MLS_SERVER_CACHE); } + // Loaded without an authoritative server response. Would be nice to upgrade to a server load from here if possible. bool isLoadedDegraded() const { return isLoaded() && !isLoadedFromServer(); } // Advance the load state machine, trying cache fallback if necessary. |
