summaryrefslogtreecommitdiff
path: root/indra/llcorehttp
diff options
context:
space:
mode:
authorMike <contact@mikelittman.me>2026-10-22 12:19:49 -0400
committerGitHub <noreply@github.com>2026-10-23 00:19:49 +0800
commit32721d1421819fcd8ca0776421e147d59dad60ab (patch)
tree6b2a721c548609fb3bb7c70f0b2d0ab81f216b84 /indra/llcorehttp
parent0bd96379e6130481418cb25bdac5ba9416131afc (diff)
Do not abort when a shutdown thread joins itself (#40)
std::thread::join throws system_error if the caller is the thread being joined. That uncaught exception aborted the process during shutdown. Detach the current thread instead, and catch a join that still throws.
Diffstat (limited to 'indra/llcorehttp')
-rw-r--r--indra/llcorehttp/llwebsocketmgr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llcorehttp/llwebsocketmgr.cpp b/indra/llcorehttp/llwebsocketmgr.cpp
index ef07295eed..701fbd5446 100644
--- a/indra/llcorehttp/llwebsocketmgr.cpp
+++ b/indra/llcorehttp/llwebsocketmgr.cpp
@@ -28,6 +28,7 @@
#include "llwebsocketmgr.h"
#include "llerror.h"
+#include "llthread.h"
#include "llsdserialize.h"
#include "llhost.h"
#include "llsdjson.h"
@@ -508,7 +509,7 @@ void LLWebsocketMgr::WSServer::stop()
<< "thread-boundary regression." << LL_ENDL;
}
- mServerThread.join();
+ ll_join_thread(mServerThread);
LL_INFOS("WebSocket") << "WebSocket server thread joined for: " << mServerName << LL_ENDL;
}
onStopped();