summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/llwebsocketmgr.cpp
diff options
context:
space:
mode:
authorMike <contact@mikelittman.me>2026-10-22 11:36:21 -0400
committerGitHub <noreply@github.com>2026-10-22 23:36:21 +0800
commitf2a1ad0e53632ad69729c9bd55edcdfe8ef98368 (patch)
tree3c323a88a92d145dab4bd11f5e432bcefe0a796e /indra/llcorehttp/llwebsocketmgr.cpp
parentb087c0c8d818bace45a9d0d2dec3661f1261896d (diff)
Do not abort when a shutdown thread joins itself (#37)26.5
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/llwebsocketmgr.cpp')
-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();