From 86668633c30c711b44dd5a16f98b9ac056f706b5 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Sun, 21 Jul 2024 19:18:13 -0400 Subject: Fix failure to join or detach threads causing rare shutdown termination --- indra/llcommon/llthread.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 9eb92ca6a1..e5d25b52f0 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -269,6 +269,7 @@ void LLThread::shutdown() mStatus = STOPPED; return; } + delete mThreadp; mThreadp = NULL; } @@ -299,6 +300,7 @@ void LLThread::start() { mThreadp = new std::thread(std::bind(&LLThread::threadRun, this)); mNativeHandle = mThreadp->native_handle(); + mThreadp->detach(); } catch (std::system_error& ex) { -- cgit v1.2.3