summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender2dutils.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2026-08-06 16:54:44 -0700
committerRoxie Linden <roxie@lindenlab.com>2026-08-06 16:54:44 -0700
commit8c5ec43ebc5c51372e2ebf4e3cb13faa7f1283e7 (patch)
tree0517959512fc0d6876780641da88b74dd72aec5b /indra/llrender/llrender2dutils.cpp
parent0686467f42a06ec84368851f48f31beb43888df0 (diff)
p#682 Fix shutdown crash flushing peer connection stats
LLWebRTCImpl::terminate() only posted the peer connection closes to the signaling thread, so they ran behind the BlockingCall that releases the factory -- after the factory and device module were gone, or not at all if the thread was destroyed with the task still queued. That matters for stats: PeerConnection::Close() flushes any in-flight GetStats request and delivers the report inline, and our callback walks mSignalingObserverList to hand it to the viewer. By then the viewer's LLVoiceWebRTCConnection objects have been destroyed -- on shutdown they deliberately skip unsetSignalingObserver, on the assumption that llwebrtc::terminate() already finished the job -- so the stats callback reaches into freed memory. Split the close out of LLWebRTCPeerConnectionImpl::terminate() into closeOnSignalingThread() and run it from a BlockingCall, so connections are closed and destroyed on the signaling thread before the factory, the device module or the observers go away. Also take ownership of the connection list up front so the detached thread in the timeout path isn't racing the main thread over it, clear the observer lists as part of the close, and skip the observer notification for a stats report delivered while shutting down. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'indra/llrender/llrender2dutils.cpp')
0 files changed, 0 insertions, 0 deletions