summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/llwebsocketmgr.h
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2026-09-23 16:28:04 -0700
committerRider Linden <rider@lindenlab.com>2026-09-23 16:28:04 -0700
commit500587a04bf3a8793e8f32fe397e0b4e469aedb4 (patch)
treecf2187f718abe45056bb4753b16efc6fc83feb7b /indra/llcorehttp/llwebsocketmgr.h
parentd186daa361567fe499b80efe8481e192ffe8199b (diff)
Issue #6367: The viewer would hang on exit if still connected to a plugin. Updates how the viewer dispatches coroutines to the main thread and removes an extraneous wait, that was incorrectly serializing asynchronous messages.
Diffstat (limited to 'indra/llcorehttp/llwebsocketmgr.h')
-rw-r--r--indra/llcorehttp/llwebsocketmgr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/llcorehttp/llwebsocketmgr.h b/indra/llcorehttp/llwebsocketmgr.h
index 2c335307e3..b962b4b117 100644
--- a/indra/llcorehttp/llwebsocketmgr.h
+++ b/indra/llcorehttp/llwebsocketmgr.h
@@ -246,6 +246,10 @@ public:
connection_state_t getConnectionState(const connection_h& handle) const;
protected:
+ /// Snapshot of live connections. Safe to iterate after the lock is
+ /// released -- these are real shared_ptrs, not weak references.
+ std::vector<WSConnection::ptr_t> getConnections() const;
+
virtual WSConnection::ptr_t connectionFactory(WSServer::ptr_t server, connection_h handle);
bool start();
@@ -283,6 +287,7 @@ public:
// Threading support
std::thread mServerThread; ///< Thread running the ASIO event loop
std::atomic<bool> mShouldStop{ false }; ///< Thread-safe stop flag
+ std::atomic<bool> mRunning{ false }; ///< True from just before the I/O thread launches until it exits
mutable LLMutex mThreadMutex; ///< Mutex for thread synchronization
};