diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-08-21 20:17:31 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-08-24 20:09:45 +0300 |
| commit | 0da385368a875bfc204adb14b970b818a642e854 (patch) | |
| tree | 96aee157705e6cc2264d6cb6894e3bdcf6dc9475 /indra/llcorehttp/httpstats.cpp | |
| parent | 1dce7c190ffffe4d935bea84ebd2daa28963b36c (diff) | |
#6172 Crash on recordResultCode
mResutCodes gets modified from different threads, mutex it.
Diffstat (limited to 'indra/llcorehttp/httpstats.cpp')
| -rw-r--r-- | indra/llcorehttp/httpstats.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/llcorehttp/httpstats.cpp b/indra/llcorehttp/httpstats.cpp index dc2ac35c71..f64752e91e 100644 --- a/indra/llcorehttp/httpstats.cpp +++ b/indra/llcorehttp/httpstats.cpp @@ -41,6 +41,7 @@ HTTPStats::~HTTPStats() void HTTPStats::resetStats() { + std::lock_guard<std::mutex> lock(mStatsMutex); mResutCodes.clear(); mDataDown.reset(); mDataUp.reset(); @@ -50,6 +51,7 @@ void HTTPStats::resetStats() void HTTPStats::recordResultCode(S32 code) { + std::lock_guard<std::mutex> lock(mStatsMutex); std::map<S32, S32>::iterator it; it = mResutCodes.find(code); @@ -86,6 +88,7 @@ namespace void HTTPStats::dumpStats() { + std::lock_guard<std::mutex> lock(mStatsMutex); std::stringstream out; out << "HTTP DATA SUMMARY" << std::endl; |
