diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-05-19 02:30:45 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-05-19 02:30:45 -0700 |
commit | ddbd1ab47ea6cd76ed3e6bf32ffaeb73a32b4a97 (patch) | |
tree | 2dc638dae2efac22cc3b4783b9ff0a371d58a044 /indra/llwebrtc/llwebrtc.cpp | |
parent | 2b275d43fb70f396bba4249c34442e7d70a76e19 (diff) |
More session shutdown cleanup
Diffstat (limited to 'indra/llwebrtc/llwebrtc.cpp')
-rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index c72841e9e5..14fb63ec2a 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -280,9 +280,15 @@ void LLWebRTCImpl::terminate() { connection->terminate(); } - mPeerConnections.clear(); + + // connection->terminate() above spawns a number of Signaling thread calls to + // shut down the connection. The following Blocking Call will wait + // until they're done before it's executed, allowing time to clean up. mSignalingThread->BlockingCall([this]() { mPeerConnectionFactory = nullptr; }); + + mPeerConnections.clear(); + mWorkerThread->BlockingCall( [this]() { @@ -652,7 +658,6 @@ LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() : LLWebRTCPeerConnectionImpl::~LLWebRTCPeerConnectionImpl() { - terminate(); mSignalingObserverList.clear(); mDataObserverList.clear(); } |