diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-06-15 22:52:57 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-06-16 16:19:36 +0300 |
| commit | dace31455ca4b382f94a03d3c7c244d805bd85fd (patch) | |
| tree | a19aea3345814106824c2fb9c4465f563822056d /indra/newview/llappviewer.cpp | |
| parent | 690374c0165d371a285d7c1c38318673e3521b6d (diff) | |
#5856 Improve stats reliability on non-standard shutdown
Diffstat (limited to 'indra/newview/llappviewer.cpp')
| -rw-r--r-- | indra/newview/llappviewer.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4a6739bb40..263c1f2054 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3621,10 +3621,11 @@ LLSD LLAppViewer::getViewerInfo() const info["LIBVLC_VERSION"] = "Undefined"; #endif - S32 packets_in = (S32)LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN); + LLTrace::Recording& recording = LLViewerStats::instance().getRecording(); + S32 packets_in = (S32)recording.getSum(LLStatViewer::PACKETS_IN); if (packets_in > 0) { - info["PACKETS_LOST"] = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST); + info["PACKETS_LOST"] = recording.getSum(LLStatViewer::PACKETS_LOST); info["PACKETS_IN"] = packets_in; info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal(); } @@ -4380,6 +4381,13 @@ void LLAppViewer::requestQuit() // This prevents the halfway-logged-in avatar from hanging around inworld for a couple minutes. if (region) { + // We probably don't have caps to do it, and it might + // arrive after logout finishes, but attempt to send stats + if (region->capabilitiesReceived()) + { + constexpr bool include_preferences = true; + send_viewer_stats(include_preferences); + } sendLogoutRequest(); } |
